以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 网页时间赋值不成功 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=196251) |
-- 作者:cxmxjwlmq -- 发布时间:2025/4/11 17:07:00 -- 网页时间赋值不成功 各位老师:下面是个网址,在窗口内打开后,想更改日期和页码,标红的部件, web.Navigate("http://beiyuanchun.com/jiagexingqing/?&chandi=&pz=&rqstart= 2025-04-10&rqend=2025-04-10&fl=%E8%94%AC%E8%8F%9C&sc=&page=1") 其网页分析如下:1、日期: ..... <UL class=riqiss> <LI id=start class="inline
laydate-icon">2025-04-09 </LI> <LI> — </LI> <LI id=end class="inline
laydate-icon">2025-04-10</LI></UL><INPUT id=rqstart
type=hidden value=2008-12-31 name=rqstart> <INPUT id=rqend type=hidden
value=2025-04-10 name=rqend> <SPAN onclick=winconfirm(chandi.value,rqstart.value,rqend.value,varieties.value,1)
class=onjs1>搜索</SPAN> ..... 用下面代码赋值提示错误:,搜索按钮不可用 web.Document.GetElementById("star").SetAttribute("Value",2025-04-10) 2、页码: .... <TD>2025-04-09</TD></TR></TBODY></TABLE></DIV><!--列表stop--><!--分页start--> <DIV class=jgfenye> <DIV class=pagelistbox><SPAN>共 4 页/73条记录
</SPAN><SPAN class=indexPage><A onclick=gopage(1);
class=nextPage>首页 </A></SPAN><A onclick=gopage(1);
class=on>1</A> <A onclick=gopage(2);>2</A> <A
onclick=gopage(2); class=nextPage>下页</A> <A
onclick=gopage(4); class=endPage>末页</A>
</DIV></DIV><!--分页stop--></DIV>
<DIV class=fanhui><A
class=af
href="#"> </A> </DIV> .... 我原本思路是:进入web.Navigate("http://beiyuanchun.com/jiagexingqing/“)网址后,用代码给开始和结束日期赋值后点搜索,根据页面下载相关内容,但现在赋值提示错误,页面不让更换! 请各位老师费心! |
-- 作者:有点蓝 -- 发布时间:2025/4/11 17:14:00 -- web.Document.GetElementById("star").SetAttribute("value","2025-04-10") |
-- 作者:cxmxjwlmq -- 发布时间:2025/4/11 17:30:00 -- 提示如上图
|
-- 作者:有点蓝 -- 发布时间:2025/4/11 17:35:00 -- 说明网页没有这个id为star的控件。或者网页还没有加载完毕 |