|
发表于 2013-1-25 00:58:19
|
显示全部楼层
这个算是临时解决办法,可以获取完整的8个课程名。- import web.form;
- /*DSG{{*/
- mainForm = ..win.form( bottom=651;parent=...;text="aardio Form";right=855;scroll=1 )
- mainForm.add(
- edit4={ autohscroll=false;bottom=559;right=820;left=28;multiline=1;top=517;z=5;edge=1;cls="edit" };
- edit={ bottom=629;right=89;left=41;multiline=1;top=594;hide=1;z=2;text="edit";edge=1;cls="edit" };
- button={ bottom=643;right=445;left=323;top=591;z=1;text="button";cls="button" };
- edit3={ bottom=629;right=263;left=191;multiline=1;top=589;hide=1;z=4;text="edit3";edge=1;cls="edit" };
- edit2={ bottom=626;right=175;left=106;multiline=1;top=593;hide=1;z=3;text="edit2";edge=1;cls="edit" }
- )
- /*}}*/
- //创建web窗体
- mainWb = web.form( mainForm);
-
- //打开目标网站
- mainWb.go("K:\编程\aardio编程\工程\aardio工程2\res\yi.html")
- mainForm.show();
- mainWb.wait("");
- mainForm.button.oncommand = function(id,event){
- var ele = mainWb.queryEles(parent="jsKcxzIfra";tagName="tbody");
- var kechengbiao = ele(1).innerText;
-
- var tab = string.split(kechengbiao,'<\r\n>')
- for(i=1;#tab;1){
- var str = tab[ i ];
- var kecheng = string.match(str,"(.*?)\s+\u+");
- mainForm.edit4.text = mainForm.edit4.text + "|" + kecheng;
- }
- }
- //进入消息循环
- win.loopMessage();
复制代码 附上你提供的HTML源码,如果不能公开,可以提醒我删除,贴上来主要是方便大家分析。
主页面,我命名为 yi.html:主页面调用的框架页面,我命名为 child.html :
- <html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>教师课程选择(成绩录入)</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link href="/css/newcss/project.css" rel="stylesheet" type="text/css" />
- <link href="/css/newcss/project.css" rel="stylesheet" type="text/css" />
- </head>
- <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="overflow:auto;">
- <script language="javascript" type="text/javascript">
- //<![CDATA[
- function clickButton(zxjxjhh,kch,kxh,type){
- document.CjlrInfoForm.zxjxjhh.value = zxjxjhh;
- document.CjlrInfoForm.kch.value = kch;
- document.CjlrInfoForm.kxh.value = kxh;
- var tempStr;
- var flagStr=0;
- document.CjlrInfoForm.action="cjlrAction.do?oper=cjlrAllType&zxjxjhh="+zxjxjhh+"&kch="+kch+"&kxh="+kxh+"&cjlrfs="+type;
- document.CjlrInfoForm.target = '_parent';
- document.CjlrInfoForm.submit();
- }
- function clickButtonKccj(tempStr){
- var arrayStr = tempStr.split("_");
- document.CjlrInfoForm.zxjxjhh.value = arrayStr[0];
- document.CjlrInfoForm.kch.value = arrayStr[1];
- document.CjlrInfoForm.kxh.value = arrayStr[2];
- var tempStr;
- var flagStr=0;
- document.CjlrInfoForm.target = '_parent';
- document.CjlrInfoForm.action = "cjlrAction.do?actionType=1&oper=kccj";
- document.CjlrInfoForm.submit();
- }
- function clickButtonFdjcj(tempStr){
- var arrayStr = tempStr.split("_");
- document.CjlrInfoForm.zxjxjhh.value = arrayStr[0];
- document.CjlrInfoForm.kch.value = arrayStr[1];
- document.CjlrInfoForm.kxh.value = arrayStr[2];
- var tempStr;
- var flagStr=0;
- document.CjlrInfoForm.target = '_parent';
- document.CjlrInfoForm.action = "cjlrInfoAction.do?oper=djcj&oper1=lrfdjcj&zxjxjhh="+arrayStr[0]+"&kch="+arrayStr[1]+"&kxh="+arrayStr[2];
- document.CjlrInfoForm.submit();
- }
- function clickButtonDjcj(tempStr){
- var arrayStr = tempStr.split("_");
- document.CjlrInfoForm.zxjxjhh.value = arrayStr[0];
- document.CjlrInfoForm.kch.value = arrayStr[1];
- document.CjlrInfoForm.kxh.value = arrayStr[2];
- var tempStr;
- var flagStr=0;
- document.CjlrInfoForm.target = '_parent';
- document.CjlrInfoForm.action = "cjlrInfoAction.do?oper=djcj&oper1=lrdjcj&zxjxjhh="+arrayStr[0]+"&kch="+arrayStr[1]+"&kxh="+arrayStr[2];
- document.CjlrInfoForm.submit();
- }
- function lrxs(zxjxjhh,kch,kxh, type){
- document.CjlrInfoForm.zxjxjhh.value = zxjxjhh;
- document.CjlrInfoForm.kch.value = kch;
- document.CjlrInfoForm.kxh.value = kxh;
- document.CjlrInfoForm.target = '_parent';
- document.CjlrInfoForm.action="rwCjxsAction.do?oper=cjxsView&zxjxjhh="+zxjxjhh+"&kch="+kch+"&kxh="+kxh;
- document.CjlrInfoForm.submit();
- }
- //]]>
- </script><!--
- <link href="css/style.css" rel="stylesheet" type="text/css">
- <html>
- <head>
- <title>
- 成绩录入注意事项
- </title>
- </head>
- <body bgcolor="#ffffff">
- <table width="100%" cellSpacing=0 cellPadding=0 align=center borderColorLight=#7AA5E4 borderColorDark=#ffffff border=0>
- <tr><td><font color="red">注意事项:</font></td>
- </tr>
- <tr><td><font color="red">1,期末成绩是期末考试卷面成绩,期末成绩按院系要求录入。</font></td>
- </tr>
- <tr>
- <td><font color="red">2,总成绩是总评成绩,总成绩必须录入。</font></td>
- </tr>
- <tr>
- <td><font color="red">3,成绩暂存状态可以修改,成绩提交后不可修改;成绩提交后学生方可在网上查询总成绩。</font></td>
- </tr>
- <tr>
- <td><font color="red">4,请点击"〇课堂成绩"后,再点击“录入成绩(按分数录入)或录入成绩(按等级录入)”进入学生名单 。 </font></td>
- </tr>
- </table>
- </body>
- </html> -->
- <form name="CjlrInfoForm" method="post" action="cjlrInfoAction.do?oper=djcj&oper1=lrdjcj">
- <input type="hidden" name="zxjxjhh" value="" /> <input type="hidden" name="kch" value="" /> <input type="hidden" name="kxh" value="" /> <!-- 列表开始 -->
- <table width="100%" border="0" cellpadding="0" cellspacing="0" class="titleTop2">
- <tr>
- <td class="pageAlign">
- <table cellpadding="0" width="100%" class="displayTag" cellspacing="1" border="0" id="user">
- <thead>
- <tr>
- <th width="80" class="sortable">课程名</th>
- <th width="80" class="sortable">课程号</th>
- <th width="80" class="sortable">课序号</th>
- <th width="80" class="sortable">是否负责教师</th>
- <th width="80" class="sortable">学年</th>
- <th width="80" class="sortable">学期</th>
- <th width="80" class="sortable">学期类型</th>
- <th width="80" class="sortable"><strong>录入系数</strong></th>
- <th width="80" class="sortable"><strong>录入成绩</strong></th>
- </tr>
- </thead>
- <tbody>
- <tr class="odd" onmouseout="this.className='even';" onmouseover="this.className='evenfocus';">
- <td>中国饮食文化(公选) </td>
- <td>BG2400011 </td>
- <td>02 </td>
- <td>是 </td>
- <td>2012-2013学年 </td>
- <td>一 </td>
- <td>两学期 </td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="lrxs('2012-2013-1-1','BG2400011','02','cjlr');return false;" id="btnSearch" style="cursor:hand;" title="录入成绩系数" /></td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="clickButton('2012-2013-1-1','BG2400011','02','allTypeCjlr');return false;" style="cursor:hand;" title="录入成绩" /></td>
- </tr>
- <tr class="odd" onmouseout="this.className='even';" onmouseover="this.className='evenfocus';">
- <td>食品生物技术09 </td>
- <td>BX0924011 </td>
- <td>01 </td>
- <td>是 </td>
- <td>2012-2013学年 </td>
- <td>一 </td>
- <td>两学期 </td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="lrxs('2012-2013-1-1','BX0924011','01','cjlr');return false;" id="btnSearch" style="cursor:hand;" title="录入成绩系数" /></td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="clickButton('2012-2013-1-1','BX0924011','01','allTypeCjlr');return false;" style="cursor:hand;" title="录入成绩" /></td>
- </tr>
- <tr class="odd" onmouseout="this.className='even';" onmouseover="this.className='evenfocus';">
- <td>食品感官评定09 </td>
- <td>BX0924018 </td>
- <td>01 </td>
- <td>是 </td>
- <td>2012-2013学年 </td>
- <td>一 </td>
- <td>两学期 </td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="lrxs('2012-2013-1-1','BX0924018','01','cjlr');return false;" id="btnSearch" style="cursor:hand;" title="录入成绩系数" /></td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="clickButton('2012-2013-1-1','BX0924018','01','allTypeCjlr');return false;" style="cursor:hand;" title="录入成绩" /></td>
- </tr>
- <tr class="odd" onmouseout="this.className='even';" onmouseover="this.className='evenfocus';">
- <td>中国饮食文化(现科公选) </td>
- <td>DG2400011 </td>
- <td>02 </td>
- <td>是 </td>
- <td>2012-2013学年 </td>
- <td>一 </td>
- <td>两学期 </td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="lrxs('2012-2013-1-1','DG2400011','02','cjlr');return false;" id="btnSearch" style="cursor:hand;" title="录入成绩系数" /></td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="clickButton('2012-2013-1-1','DG2400011','02','allTypeCjlr');return false;" style="cursor:hand;" title="录入成绩" /></td>
- </tr>
- <tr class="odd" onmouseout="this.className='even';" onmouseover="this.className='evenfocus';">
- <td>食品生物技术(现科09) </td>
- <td>DX0924011 </td>
- <td>01 </td>
- <td>是 </td>
- <td>2012-2013学年 </td>
- <td>一 </td>
- <td>两学期 </td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="lrxs('2012-2013-1-1','DX0924011','01','cjlr');return false;" id="btnSearch" style="cursor:hand;" title="录入成绩系数" /></td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="clickButton('2012-2013-1-1','DX0924011','01','allTypeCjlr');return false;" style="cursor:hand;" title="录入成绩" /></td>
- </tr>
- <tr class="odd" onmouseout="this.className='even';" onmouseover="this.className='evenfocus';">
- <td>食品感官评定(现科09) </td>
- <td>DX0924018 </td>
- <td>01 </td>
- <td>是 </td>
- <td>2012-2013学年 </td>
- <td>一 </td>
- <td>两学期 </td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="lrxs('2012-2013-1-1','DX0924018','01','cjlr');return false;" id="btnSearch" style="cursor:hand;" title="录入成绩系数" /></td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="clickButton('2012-2013-1-1','DX0924018','01','allTypeCjlr');return false;" style="cursor:hand;" title="录入成绩" /></td>
- </tr>
- <tr class="odd" onmouseout="this.className='even';" onmouseover="this.className='evenfocus';">
- <td>食品标准与法规(专科)(专科) </td>
- <td>ZB2404019 </td>
- <td>01 </td>
- <td>是 </td>
- <td>2012-2013学年 </td>
- <td>一 </td>
- <td>两学期 </td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="lrxs('2012-2013-1-1','ZB2404019','01','cjlr');return false;" id="btnSearch" style="cursor:hand;" title="录入成绩系数" /></td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="clickButton('2012-2013-1-1','ZB2404019','01','allTypeCjlr');return false;" style="cursor:hand;" title="录入成绩" /></td>
- </tr>
- <tr class="odd" onmouseout="this.className='even';" onmouseover="this.className='evenfocus';">
- <td>食品感官评定(专科)(专科) </td>
- <td>ZX2400067 </td>
- <td>01 </td>
- <td>是 </td>
- <td>2012-2013学年 </td>
- <td>一 </td>
- <td>两学期 </td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="lrxs('2012-2013-1-1','ZX2400067','01','cjlr');return false;" id="btnSearch" style="cursor:hand;" title="录入成绩系数" /></td>
- <td align="center"><img src="/img/icon/edit.gif" onclick="clickButton('2012-2013-1-1','ZX2400067','01','allTypeCjlr');return false;" style="cursor:hand;" title="录入成绩" /></td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </table>
- </form><!-- 100729
-
- <TR>
- <TD height="18" bgcolor="#E2ECFA">
- <DIV align=right>
-
- 共8页 第1页
-
- <a href="/jsKcxzAction.do?actionType=2&oper=cjlrkc" target="jsKcxzIfra" style="TEXT-DECORATION:underline">下一页</a>
- </DIV>
- </TD>
- </TR>
- -->
- </body>
- </html>
复制代码 |
|