以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  web  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=172658)

--  作者:BoomBoomm
--  发布时间:2021/10/25 9:30:00
--  web
老师您好,我想问一下就是web端怎么嵌入html代码,例如我写了个登录的页面,然后用foxtable生成的话处理文本框按钮,我想就是html的登录模板套进去可以吗
--  作者:有点酸
--  发布时间:2021/10/25 10:29:00
--  
http://www.foxtable.com/mobilehelp/topics/0061.htm

http://www.foxtable.com/mobilehelp/topics/0097.htm


--  作者:BoomBoomm
--  发布时间:2021/10/25 10:44:00
--  
老师我想问一下Select Case e.Path
    Case "test.htm"
        Dim wb As New WeUI
        wb.InsertHTML(
"<h3 align=\'center\' style=\'margin-top:5px\'>
用户登录</h3>")
        wb.AddForm("","form1","test.htm")
        With wb.AddInputGroup("form1","ipg1")
            .Attribute = "style=\'margin-top:5px\'"
            .AddInput("xm",
"
户名","text")
            .AddInput("pw",
"
密码","password")
        End With
        With wb.AddButtonGroup("form1","btg1",True)
            .Add("btn1"
"
确定""submit")
        End With
        e.WriteString(wb.Build)

End
 Select
html的代码要一条一条的加吗

--  作者:有点酸
--  发布时间:2021/10/25 10:54:00
--  
比用,代码做成一个文本文件,读取这个文本文件内容,用InsertHTML插入就行了。
--  作者:BoomBoomm
--  发布时间:2021/10/25 11:04:00
--  
老师可以再讲一次吗,不是很听的懂
--  作者:有点酸
--  发布时间:2021/10/25 11:08:00
--  
例如:
....
Dim s As string = FileSys.ReadAllText("c:\\data\\code.txt")
wb.InsertHTML(s)
...

--  作者:BoomBoomm
--  发布时间:2021/10/25 11:32:00
--  
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<meta name="viewport" c>
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<meta name="keywords" c />
<link href="css/style.css" rel=\'stylesheet\' type=\'text/css\' />
<!--webfonts-->
<link href=\'http://fonts.useso.com/css?family=PT+Sans:400,700,400italic,700italic|Oswald:400,300,700\' rel=\'stylesheet\' type=\'text/css\'>
<link href=\'http://fonts.useso.com/css?family=Exo+2\' rel=\'stylesheet\' type=\'text/css\'>
<!--//webfonts-->
<script src="http://ajax.useso.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
</head>
<body>
<script>$(document).ready(function(c) {
$(\'.close\').on(\'click\', function(c){
$(\'.login-form\').fadeOut(\'slow\', function(c){
  $(\'.login-form\').remove();
});
});   
});
</script>
 <!--SIGN UP-->
 <h1>klasikal Login Form</h1>
<div class="login-form">
<div class="close"> </div>
<div class="head-info">
<label class="lbl-1"> </label>
<label class="lbl-2"> </label>
<label class="lbl-3"> </label>
</div>
<div class="clear"> </div>
<div class="avtar">
<img src="images/avtar.png" />
</div>
<form>
<input type="text" class="text" value="Username" >
<div class="key">
<input type="password" value="Password" >
</div>
</form>
<div class="signin">
<input type="submit" value="Login" >
</div>
</div>
 <div class="copy-rights">
</div>

</body>
</html>

--  作者:BoomBoomm
--  发布时间:2021/10/25 11:34:00
--  
这个怎么跟Dim sb As New StringBuilder
Dim Verified As Boolean
Dim UserName As String = e.Cookies("username") \'从cookie中获取用户名
Dim Password As String = e.Cookies("password") \'从cookie中获取用户密码
\'如果在登录页面输入了用户名和密码后单击确定按钮
If e.Path = "logon.htm" AndAlso e.PostValues.ContainsKey("username") AndAlso e.PostValues.ContainsKey("password")  Then
    UserName = e.PostValues("username")
    Password = e.PostValues("password")
End If
\'验证用户身份
Dim dr As DataRow = DataTables("web端用户表").find("用户名=\'" & UserName & "\'")
If dr IsNot Nothing AndAlso dr("密码") = Password  Then
Verified  = True
End If

If Verified AndAlso e.Path = "logon.htm"  Then \'如果用户访问的是登录页,且身份验证成功
    e.Appendcookie("username",UserName) \'将用户名和密码写入cookie
    e.Appendcookie("password",Password)
    e.WriteString("<meta http-equiv=\'Refresh\' c>") \'直接跳转到首页
    Return \'必须的
ElseIf Verified = False AndAlso e.Path <> "logon.htm" Then \'如果用户身份验证失败,且访问的不是登录页面
    e.WriteString("<meta http-equiv=\'Refresh\' c>") \'那么直接跳转到登录页面
    Return \'必须的
End If
Select Case e.path
    Case "logon.htm"
        Dim wb As New WeUI
        Dim s As String = FileSys.ReadAllText("D:\\web\\log.txt")
        wb.InsertHTML(s)
        sb.AppendLine("<form action=\'logon.htm\' enctype=\'multipart/form-data\' method=\'post\' id=\'form1\'  name=\'form1\'>")
        If e.PostValues.ContainsKey("username") AndAlso e.PostValues.ContainsKey("password")  Then \'判断是否是验证失败后的重新登录
            sb.AppendLine("用户名或密码错误!</br></br>")
            sb.AppendLine("户名: <input name=\'username\' id=\'username\' value=\'" & UserName & "\'\'><br/><br/>")
            sb.AppendLine("密码: <input type=\'password\' name=\'password\' id=\'password\' value =\'" & Password & "\'><br/><br/>")
        Else
            sb.AppendLine("户名: <input name=\'username\' id=\'username\'><br/><br/>")
            sb.AppendLine("密码: <input type=\'password\' name=\'password\' id=\'password\'><br/><br/>")
        End If
        sb.AppendLine("<input type=\'submit\' name=\'sumbit\' id=\'sumbit\' value=\'登录\'>")
        sb.AppendLine("<input type=\'reset\' name=\'reset\' id=\'reset\' value=\'重置\'>")
        sb.AppendLine("</form>")
        e.WriteString(sb.ToString)
    Case "exit.htm"
        e.Appendcookie("username", "") \'清除cookie中原来的用户名和密码
        e.Appendcookie("password", "")
        e.WriteString("<meta http-equiv=\'refresh\' c>") \'跳转到登录页
    Case "", "default.htm"
        sb.AppendLine("这是首页<br/><br/>")
        sb.AppendLine("<a href=\'order.htm\'>订购产品<a><br/>")
        sb.AppendLine("<a href=\'product.htm\'>产品列表<a><br/>")
        sb.AppendLine("<a href=\'exit.htm\'>退出登录<a><br/>")
        e.WriteString(sb.Tostring)
    Case "order.htm"
        e.WriteString("这是订购页")
这个结合在一起呢老师登录的

--  作者:有点酸
--  发布时间:2021/10/25 11:51:00
--  
如果你是单独用这个网页,直接发送不就行了吗?

可以看看:
http://www.foxtable.com/mobilehelp/topics/0020.htm

--  作者:BoomBoomm
--  发布时间:2021/10/28 10:56:00
--  
老师我要把foxtable的登陆的代码放着web里面真的要一条一条的加吗,不能结合起来吗