以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 原生的HTML代码用AppendHTML方法添加的疑问 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=186958) |
-- 作者:xuezxz -- 发布时间:2023/6/10 23:45:00 -- 原生的HTML代码用AppendHTML方法添加的疑问 比如下面的: 以下内容为程序代码: 1 <div id="self_defined_element" class="self-defined-classname"></div> 2 <style> 3 .self-defined-classname { 4 width: 300px; 5 height: 300px; 6 } 7 </style> 是改成下面这样吗? Dim wb
As New weui wb.AppendHTML("<div id=’self_defined_element‘ class=’self-defined-classname‘></div>“) wb.AppendHTML("<style> “)
wb.AppendHTML(" .self-defined-classname { “) wb.AppendHTML(" width: 300px;“) wb.AppendHTML(" height: 300px;“) wb.AppendHTML(" }“) wb.AppendHTML("</style>“) e.WriteString(wb.Build) 如果不是的话,要怎么改呢
|
-- 作者:有点蓝 -- 发布时间:2023/6/11 20:23:00 -- Dim wb As New weui wb.InsertHTML("<div id=’self_defined_element‘ class=’self-defined-classname‘></div>“) wb.AppendHTML("<style> .self-defined-classname {width: 300px; height: 300px;}</style>“,true)
|
-- 作者:xuezxz -- 发布时间:2023/6/13 16:55:00 -- 用html可以正常显示 以下内容为程序代码: 1 <html> 2 3 <head> 4 <script src="https://g.alicdn.com/dingding/h5-dingtalk-login/0.21.0/ddlogin.js"></script> 5 <style> .ewmys {width: 300px;height: 300px;} </style> 6 </head> 7 8 <body> 9 <div id="ewm" class="ewmys"></div> 10 <script> 11 window.DTFrameLogin( 12 {id: \'ewm\',width: 300,height: 300,}, 13 { redirect_uri: encodeURIComponent(\'http://47.98.135.225/login.htm\'), 14 client_id: \'ding5y87shvpizjbvr5z\', 15 scope: \'openid\', 16 response_type: \'code\', 17 state: \'12345678\', 18 prompt: \'consent\',}, 19 (loginResult) => {const {redirectUrl, authCode, state} = loginResult; 20 window.location.href = redirectUrl;console.log(authCode);}, 21 (errorMsg) => {alert(`Login Error: ${errorMsg}`);},); 22 </script> 23 </body> 24 25 </html> 改成下面这个样子 以下内容为程序代码: 1 Dim wb As New weui 2 wb.AppendHTML("< script src = "https: / / g.alicdn.com / dingding / h5 - dingtalk - login / 0.21.0 / ddlogin.js" > < / script >", True) 3 wb.AppendHTML("< style > .ewmys {width: 300px;height: 300px;} < / style >", True) 4 wb.InsertHTML("< div id = "ewm" Class = "ewmys" > < / div > ") 5 wb.InsertHTML(" < script > ") 6 wb.InsertHTML("window.DTFrameLogin(") 7 wb.InsertHTML("{id: \'ewm\',width: 300,height: 300,},") 8 wb.InsertHTML("{ redirect_uri: encodeURIComponent(\'http://47.98.135.225/login.htm\'),") 9 wb.InsertHTML("client_id: \'ding5y87shvpizjbvr5z\',") 10 wb.InsertHTML("scope: \'openid\',") 11 wb.InsertHTML("response_type: \'code\',") 12 wb.InsertHTML("state: \'12345678\',") 13 wb.InsertHTML("prompt: \'consent\',},") 14 wb.InsertHTML("(loginResult) = > {Const {redirectUrl, authCode, state} = loginResult;") 15 wb.InsertHTML("window.location.href = redirectUrl;console.log(authCode);}, ") 16 wb.InsertHTML("(errorMsg) = > {alert(`Login Error: ${errorMsg}`);}, );") 17 wb.InsertHTML(" < / script > ") 18 e.WriteString(wb.Build) 报错 请问这段应该怎么改?
|
-- 作者:有点蓝 -- 发布时间:2023/6/13 17:13:00 -- 这个错误和这些代码没有什么关系。 1、卸载Foxtable,重新安装到其它目录。注意安装路径不能有中文,不能有括号等特殊符号。 安装后在Windows的桌面上右击Foxtable的快捷方式,在快捷菜单中的单击属性命令,然后在兼容性页面中勾选“以管理员身份运行此程序” 2、删除项目所在的文件夹里的bin目录,然后重启项目试试。
|