6 回答
TA贡献191条经验 获得超79个赞
action="login.jsp" onsubmit="return check()"
function check()
{
if(ok)
return true;
else
return false;
}
TA贡献7条经验 获得超0个赞
<form id="Fri1" onsubmit="return check()" method="post">
<input type="submit" value="Order Now" style="color:#FF6600" >
</form>
<script type="text/javascript">
var dayNames = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
Stamp = new Date();
if(dayNames[Stamp.getDay()]=="Thu"){
document.write(dayNames[Stamp.getDay()]);
$("#Fri1 input:submit").attr("disabled","true");
}
function check(){
window.open("login.jsp");
}
</script>
这个我已经测试过好用,但是当我用到实际项目中时,form表单就不受控制能够跳转。。崩溃了
TA贡献3条经验 获得超0个赞
应该这样写:
<form action="login.jsp"> <input type="text" disabled=true /> <input type="submit" value="Order Now"> </form>
submit按钮是有用的,但输入框是无效的
添加回答
举报