function keySub(e){
var msie = (document.all) ? true : false;
var keycode;
if(!msie)keycode=e.which;
else keycode=event.keyCode;
if(keycode == 13){
toSub();
}
}
<span><input name="passWord" type="password" style="width:120px;height:18px;" dataType="Require" msg="请输入密码" οnkeydοwn="keySub(event)"/></span>
或在表单中加入
<input type="submit" value="" οnclick="return toSub();" style="width:0px;height:0px;border:none;"/>
var msie = (document.all) ? true : false;
var keycode;
if(!msie)keycode=e.which;
else keycode=event.keyCode;
if(keycode == 13){
toSub();
}
}
<span><input name="passWord" type="password" style="width:120px;height:18px;" dataType="Require" msg="请输入密码" οnkeydοwn="keySub(event)"/></span>
或在表单中加入
<input type="submit" value="" οnclick="return toSub();" style="width:0px;height:0px;border:none;"/>