以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]页面跳转出现多余的index.htm (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=106343) |
-- 作者:浙江仔 -- 发布时间:2017/9/7 8:49:00 -- [求助]页面跳转出现多余的index.htm 加载页面时,以下生成页面,在这之前有openid获取相关的代码 wb.AddPageTitle("","ph1","企业信息","当前账号:" +PersonDept+" " + PersonName ) wb.AddForm("","form1","index.htm") With wb.AddInputGroup("form1","ipg1","按关键字搜索") .AddInput("entname","企业名称","text").Placeholder = "名称关键字或法人姓名" End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "submit") End With 第一次获取openid跳转至 http://foxwx.d~.com/index.htm/?code=87enAUIJxNyh6nbEVtthSfW5SlWW2Tnu_uq4kjS2EIQ&state=wx75cc9ec9fb1b8a8a 输入框填写关键字 点确定后,网页跳转如下: http://foxwx.d~.com/index.htm/index.htm index.htm/index.htm多了一个index.htm,导致页面无法加载出来 请教大侠,怎么把多余的index.htm给弄掉? |
-- 作者:浙江仔 -- 发布时间:2017/9/7 9:02:00 -- 这么处理也不行 Case "index.htm" ,"index.htm/index.htm" Functions.Execute("Http_index",e)
|
-- 作者:有点甜 -- 发布时间:2017/9/7 9:19:00 -- wb.AddForm("","form1","index.htm")
写成
wb.AddForm("","form1","/index.htm") |
-- 作者:浙江仔 -- 发布时间:2017/9/7 9:25:00 -- 谢谢 为什么会出现这种现象? 我测试了一下 Case "index.htm" ,"index.htm\\index.htm" Functions.Execute("Http_index",e) 这样处理的话,首页是可以了,但是接下去的页面,都统一加上了index.htm,变成了index.htm/default.htm
|
-- 作者:浙江仔 -- 发布时间:2017/9/7 9:25:00 -- 是不是涉及到wb.AddForm("","form1","/index.htm"),最好都把“/”加上? |
-- 作者:有点甜 -- 发布时间:2017/9/7 9:44:00 -- / 的意思,是从根目录开始,是绝对路径;
如果不加/,就是从你当前的网页的地址开始,如果你现在访问 127.0.0.1/test/test/test/abc.htm,那么之后跳转就是 127.0.0.1/test/test/test/index.htm |
-- 作者:浙江仔 -- 发布时间:2017/9/7 9:46:00 -- ok谢谢 看来我还是加上这个比较保险
|