请问大侠们用VB6和Webbrowse做程序 遇到这样的元素该如何操作?
以下是网页源码:
<H1><A href="/StudentCenter/Right.aspx">首页</A> >> 我的课堂</H1><LABEL>客服:(免长话费)</LABEL>
<DIV class=divC></DIV></DIV>
<SCRIPT type=text/javascript src="../JScript/jquery.js"></SCRIPT>
<SCRIPT language=javascript type=text/javascript src="../JScript/Evaluation.js"></SCRIPT>
<SCRIPT language=jscript>
<!--
function SelectCourseID(ddlCourse)
{
window.location = "ClassRoom.aspx?CourseID="+ddlCourse.value;
}
-->
</SCRIPT>
<SCRIPT type=text/javascript>
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ctl00$ContentPlaceHolder1$CourseIndex2$ScriptManager1', document.getElementById('aspnetForm'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tctl00$ContentPlaceHolder1$CourseIndex2$UpdatePanel1'], [], [], 90);
//]]>
</SCRIPT>
<!--课程列表开始 -->
<DIV class=courseSelectConBorder>
<TABLE class=courseSelectTab cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD class=cousreSelectTit>
<H1>大学英语(一)高起专 <SPAN style="FONT-WEIGHT: normal">高起专计算机科学与技术</SPAN></H1></TD>
<TD class=cousreSelectForm><SELECT id=ctl00_ContentPlaceHolder1_CourseIndex2_ddlCourse class=inputBlueLong onchange=SelectCourseID(this) name=ctl00$ContentPlaceHolder1$CourseIndex2$ddlCourse> <OPTION selected value=5319>大学英语(一)高起专</OPTION> <OPTION value=81541>高等数学(一)(高起专)</OPTION> <OPTION value=81548>教育学(高起专)</OPTION> <OPTION value=720>现代远程学习概论</OPTION> <OPTION value=81554>线性代数(高起专)</OPTION> <OPTION value=81744>心理学(高起专)</OPTION></SELECT> </TD></TR></TBODY></TABLE></DIV><!--课程列表结束 -->
<DIV id=ctl00_ContentPlaceHolder1_CourseIndex2_UpdatePanel1>
<UL class=myClassRoomUl>
<LI><A id=ctl00_ContentPlaceHolder1_CourseIndex2_lbtnChat class=myCourseNavOut href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$CourseIndex2$lbtnChat','')">实时交流</A></LI>
<LI><A id=ctl00_ContentPlaceHolder1_CourseIndex2_lbtnOfflineJob class=myCourseNavOut href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$CourseIndex2$lbtnOfflineJob','')">离线作业</A></LI>
<LI><A id=ctl00_ContentPlaceHolder1_CourseIndex2_lbtnOnlineJob class=myCourseNavOut href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$CourseIndex2$lbtnOnlineJob','')">在线作业</A></LI>
<LI><A id=ctl00_ContentPlaceHolder1_CourseIndex2_lbtnCourseWare class=myCourseNavOver href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$CourseIndex2$lbtnCourseWare','')">课件浏览</A></LI>
<LI><A id=ctl00_ContentPlaceHolder1_CourseIndex2_lbtnArticle class=myCourseNavOut href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$CourseIndex2$lbtnArticle','')">课程公告</A></LI></UL>
<DIV class=classRoomConBorderGreen>
<DIV class=classRoomCon>
<DIV class=classRoomDiv> <A id=ctl00_ContentPlaceHolder1_CourseIndex2_ctl01_lBtnVirExp></A>
<DIV style="MARGIN: 10px; DISPLAY: none" id=ctl00_ContentPlaceHolder1_CourseIndex2_ctl01_tip>各位同学,<BR><BR> 奥鹏学习平台课件浏览系统升级维护,暂定时间为2012年1月8日上午9:00—2012年1月9日9:00,在此时间段内课件不能正常浏览,2012年1月9日上午9:00,课件浏览恢复正常,如给同学的学习带来不便,敬请谅解! <BR><BR> 奥鹏学生服务中心 助学服务部<BR></DIV>
<TABLE id=InCourse class=showCourseListTab border=0 cellSpacing=0 cellPadding=0>
<THEAD>
<TR>
<TH style="WIDTH: 49%">课件名称</TH>
<TD style="WIDTH: 2%"></TD>
<TH style="WIDTH: 49%">课件名称</TH></TR></THEAD>
<TBODY>
<TR class=CourseListBg1>
<TD><A id=ctl00_ContentPlaceHolder1_CourseIndex2_ctl01_dlCourseware_ctl01_HyperLink3 class=courseLinks href="../CourseWare/OpenCourseWareNew.aspx?coursewareid=3500&courseid=5319&CourseClassName=%e5%a5%a5%e9%b9%8f%e5%ad%a6%e5%8e%86&CourseWareName=%e3%80%8a%e5%a4%a7%e5%ad%a6%e8%8b%b1%e8%af%ad%ef%bc%88%e4%b8%80%ef%bc%89%e3%80%8b%e7%bd%91%e7%bb%9c%e8%af%be%e7%a8%8b" target=_blank>《大学英语(一)》网络课程</A>
<DIV>
<DIV style="TEXT-ALIGN: left; WIDTH: 100%; COLOR: black">
<DIV style="TEXT-ALIGN: left; WIDTH: 150px; FLOAT: left">课件容易使用</DIV>
<DIV id=rateMe><A id=3500_1_1588245_1 class=on title=差 onclick=rating(this);></A><A id=3500_1_1588245_2 class=on title=较差 onclick=rating(this);></A><A id=3500_1_1588245_3 class=on title=一般 onclick=rating(this);></A><A id=3500_1_1588245_4 class=on title=较好 onclick=rating(this);></A><A id=3500_1_1588245_5 class=on title=好 onclick=rating(this);></A></DIV>
<DIV><SPAN style="WIDTH: 60px; FLOAT: left" id=rateStatus_3500_1_1588245>好</SPAN><INPUT style="WIDTH: 10px; VISIBILITY: hidden" id=action_3500_1_1588245 value=5 type=text></DIV></DIV>
<DIV style="TEXT-ALIGN: left; WIDTH: 100%; COLOR: black">
<DIV style="TEXT-ALIGN: left; WIDTH: 150px; FLOAT: left">课件界面美观</DIV>
<DIV id=rateMe><A id=3500_2_1588246_1 class=on title=差 onclick=rating(this);></A><A id=3500_2_1588246_2 class=on title=较差 onclick=rating(this);></A><A id=3500_2_1588246_3 class=on title=一般 onclick=rating(this);></A><A id=3500_2_1588246_4 class=on title=较好 onclick=rating(this);></A><A id=3500_2_1588246_5 class=on title=好 onclick=rating(this);></A></DIV>
<DIV><SPAN style="WIDTH: 60px; FLOAT: left" id=rateStatus_3500_2_1588246>好</SPAN><INPUT style="WIDTH: 10px; VISIBILITY: hidden" id=action_3500_2_1588246 value=5 type=text></DIV></DIV>
<DIV style="TEXT-ALIGN: left; WIDTH: 100%; COLOR: black">
<DIV style="TEXT-ALIGN: left; WIDTH: 150px; FLOAT: left">课件教学的适用性</DIV>
<DIV id=rateMe><A id=3500_3_1588247_1 class=on title=差 onclick=rating(this);></A><A id=3500_3_1588247_2 class=on title=较差 onclick=rating(this);></A><A id=3500_3_1588247_3 class=on title=一般 onclick=rating(this);></A><A id=3500_3_1588247_4 class=on title=较好 onclick=rating(this);></A><A id=3500_3_1588247_5 class=on title=好 onclick=rating(this);></A></DIV>
<DIV><SPAN style="WIDTH: 60px; FLOAT: left" id=rateStatus_3500_3_1588247>好</SPAN><INPUT style="WIDTH: 10px; VISIBILITY: hidden" id=action_3500_3_1588247 value=5 type=text></DIV></DIV>
<DIV style="TEXT-ALIGN: left; WIDTH: 100%; COLOR: black">
<DIV style="TEXT-ALIGN: left; WIDTH: 150px; FLOAT: left">课件与考试贴合度</DIV>
<DIV id=rateMe><A id=3500_4_1588248_1 class=on title=差 onclick=rating(this);></A><A id=3500_4_1588248_2 class=on title=较差 onclick=rating(this);></A><A id=3500_4_1588248_3 class=on title=一般 onclick=rating(this);></A><A id=3500_4_1588248_4 class=on title=较好 onclick=rating(this);></A><A id=3500_4_1588248_5 class=on title=好 onclick=rating(this);></A></DIV>
<DIV><SPAN style="WIDTH: 60px; FLOAT: left" id=rateStatus_3500_4_1588248>好</SPAN><INPUT style="WIDTH: 10px; VISIBILITY: hidden" id=action_3500_4_1588248 value=5 type=text></DIV></DIV></DIV>
<DIV style="TEXT-ALIGN: left; WIDTH: 100%; HEIGHT: 40px; COLOR: black"><SPAN id=ctl00_ContentPlaceHolder1_CourseIndex2_ctl01_dlCourseware_ctl01_Evaluation1_LabelOther>留言:</SPAN> <BR><INPUT style="WIDTH: 300px; VISIBILITY: visible" id=other_3500_1_397046 class=inputTextBox maxLength=120 type=text> <FONT style="VISIBILITY: visible">(120字以内)</FONT> </DIV>
<DIV style="TEXT-ALIGN: left; WIDTH: 100%; HEIGHT: 30px"><INPUT style="VISIBILITY: visible" id=btnSubmit_10200_5319_3500_1 class=btn4 onclick=funSubmit(this); value=提交 type=button> <INPUT style="VISIBILITY: visible" id=btnViewResult_10200_5319_3500_1 class=btn6 onclick=popwindow(this); value=查看结果 type=button> </DIV></TD>
<TD></TD>
<TD><A id=ctl00_ContentPlaceHolder1_CourseIndex2_ctl01_dlCourseware_ctl01_HyperLink1 class=courseLinks href="../CourseWare/OpenCourseWareNew.aspx?coursewareid=&nbsp;&courseid=5319&CourseClassName=%e5%a5%a5%e9%b9%8f%e5%ad%a6%e5%8e%86&CourseWareName=" target=_blank></A>
<DIV></DIV>
<DIV style="TEXT-ALIGN: left; WIDTH: 100%; HEIGHT: 40px; COLOR: black"><BR><INPUT style="WIDTH: 300px; VISIBILITY: hidden" id=other_0_0_0 class=inputTextBox maxLength=120 type=text> <FONT style="VISIBILITY: hidden">(120字以内)</FONT> </DIV>
<DIV style="TEXT-ALIGN: left; WIDTH: 100%; HEIGHT: 30px"><INPUT style="VISIBILITY: hidden" id=btnSubmit_10200_5319_0_0 class=btn4 onclick=funSubmit(this); value=提交 type=button> <INPUT style="VISIBILITY: hidden" id=btnViewResult_10200_5319_0_0 class=btn6 onclick=popwindow(this); value=查看结果 type=button> </DIV></TD></TR></TBODY></TABLE></DIV>
<DIV class=rightBottom></DIV></DIV></DIV><!--外框开始 -->
<DIV class=ServiceDiv><!--导学资料开始 -->
<DIV class=informationConBorder>
<DIV class=informationCon>
我要 点击 课件浏览下一层的 一个连接 《大学英语(一)》网络课程 发现它的ID是:ctl00_ContentPlaceHolder1_CourseIndex2_ctl01_dlCourseware_ctl01_HyperLink3
我的代码:
dim doc
set doc=webbrowse1.Document
doc.getElementById("ctl00_ContentPlaceHolder1_CourseIndex2_ctl01_dlCourseware_ctl01_HyperLink3").Click
提示对像变量或with块变量未设置 其它的都可以这样操作 就这个出错 可是用spy查看 id正确啊 是不是这种表格中的元素要特殊处理啊 该怎么操作啊 请教各位大侠了!
[解决办法]
是啊,这网页没头没尾的