请帮我解释下下面两段代码的意思,谢谢!
请高手帮忙解释下这两段小程序的意思!<SCRIPT language=JavaScript type=text/javascript><!--
document._domino_target = "_self";
function _doClick(v, o, t, h) {
var form = document._DominoForm;
if (form.onsubmit) {
var retVal
= form.onsubmit();
if (typeof retVal == "boolean" && retVal == false)
return false;
}
var
target = document._domino_target;
if (o.href != null) {
if (o.target != null)
target = o.target;
} else {
if (t != null)
target = t;
}
form.target = target;
form.__Click.value = v;
if (h != null)
form.action += h;
form.submit();
return false;
}
// -->
</SCRIPT>
和
<SCRIPT language=JavaScript type=text/javascript>
<!--
function check()
{
if (document.all.input_name.value=="")
{
alert('请填写考生姓名。');
document.all.input_zhunkaozheng.focus();
return false
}
if (document.all.input_zhunkaozheng.value=="")
{
alert('请填写准考证号(或档案号)。');
document.all.input_zhunkaozheng.focus();
return false
}
document.forms[0].submit()
}
var NN4 = (document.layers) ? true : false;
// required for NN4 to reliably capture key events
if (NN4) document.captureEvents(Event.KEYPRESS)
document.onkeypress = function (event) {
checkEnter(event)
return true
}
//submit the form if the user presses the ENTER key
function checkEnter(event)
{
var code = 0
if (NN4) {
code = event.which
} else {
code = window.event.keyCode
}
if (code==13)
//document.forms[0].submit()
check()
}
// -->
</SCRIPT>
是一个查成绩的代码,我想学习下,请高手指点解释~