大家帮忙啊,很简单但怪的网页,怎样才能模拟点击这个网页确认按钮?
这是源文件代码,试了几次都不行。<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../../css/style.css" type="text/css">
<title>确认单</title>
<script language="javascript" src="../activex/xmlhttp.js"></script>
<script language="javascript" src="../activex/function.js"></script>
<script language="javascript" src="../activex/error.js"></script>
<script language="javascript">
function changeClass(classGuid)
{
location.assign("attendance_on.asp?classGuid="+classGuid)
}
function Fun_fix()
{ if(document.all.txt_LateResult.parentElement.parentElement.style.display!="none")
{
if(IsEmpty(document.all.txt_LateResult.value)){ alert("必须填写原因。");return false;}
}
var sendXML = "<userCode>hujianbo</userCode>";
sendXML +="<onTime>2009-3-14 13:00</onTime>";
sendXML +="<LateResult><!]></LateResult>";
sendXML +="<adjType>" + document.all.hid_adjType.value + "</adjType>";
sendXML +="<adjValue>" + document.all.hid_adjValue.value + "</adjValue>";
sendXML +="<lawGuid>"+document.all.hid_lawGuid.value + "</lawGuid>";
sendXML += "<classGuid>"+document.all.hid_classGuid.value+"</classGuid>";
sendXML += "<className>"+document.all.hid_className.value+"</className>";
sendXML += "<classOnTime>"+document.all.hid_classOnTime.value+"</classOnTime>";
sendXML += "<classOffTime>"+document.all.hid_clsssOffTime.value+"</classOffTime>";
sendXML += "<putBeginTime>"+document.all.hid_PutBeginTime.value+"</putBeginTime>";
sendXML += "<isLate>"+document.all.hid_isLate.value+"</isLate>";
var str = SendHttp("../attendance/sp_insertOn.asp",sendXML);
var _error = new createError(str);
if(!_error.IsError())
{
alert("提交成功。");window.returnValue = "OK";
top.window.close();
}
}
function WinClose()
{
top.window.close();
}
</script>
</head>
<body bgcolor="#F8F8F8" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border:0px"scroll=notext="#000000" >
<table width="100%" border="0">
<tr>
<td nowrap width=70 align=right>班次:</td><td width=100%>
<select style="width:160px" onchange="changeClass(this.value)">
<option value='FG2TO-M8SZG-6DRGB-UcEfe-f16a3' selected>白</option>
</select>
</td>
</tr>
<tr>
<td nowrap colspan=2>
<fieldset><legend>信息</legend>
<div style="height:100px">
<table><tr><td width=80 align=right nowrap>白:</td><td>08:00 - 18:00</td></tr><tr><td width=80 align=right>当前时间:</td><td>13:00</td></tr><tr><td colspan=2><br>XXXX(07:43)。</td></tr></table>
</div>
</fieldset>
</td>
</tr>
</table>
<input type="hidden" name="hid_adjType" value="Normal">
<input type="hidden" name="hid_adjValue" value="">
<input type="hidden" name="hid_lawGuid" value="Q5HC7-P1bDY-9ZSHP-61VDS-JER42">
<input type="hidden" name="hid_classGuid" value="FG2TO-M8SZG-6DRGB-UcEfe-f16a3">
<input type="hidden" name="hid_className" value="白">
<input type="hidden" name="hid_classOnTime" value="08:00">
<input type="hidden" name="hid_clsssOffTime" value="18:00">
<input type="hidden" name="hid_PutBeginTime" value="2009-3-2">
<input type="hidden" name="hid_isLate" value="1">
<table width="100%"border="0">
<tr>
<th scope="row" align=right>
<input type="button" name="btn_ok" value=" 确认" onClick="Fun_fix()" class="button" >
</th>
<th scope="row" width=100>
<input type="button" name="btn_clo" value=" 关闭" onClick="WinClose()" class="button">
</th>
</tr>
</table>
</body>
</html>
[ 本帖最后由 didi1965 于 2009-3-20 15:58 编辑 ] :face (13): 怪?
$oIE.document.getElementByID('btn_ok').click() 嗯 抓紧学习js 呵呵,谢谢啦
学习中:face (34):
[ 本帖最后由 didi1965 于 2009-3-20 15:48 编辑 ]
页:
[1]