<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>form</title>
<link rel="stylesheet" type="text/css" href="/jquery-easyui-1.3.1/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="/jquery-easyui-1.3.1/themes/icon.css">
<script type="text/javascript" src="/jquery-easyui-1.3.1/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="/jquery-easyui-1.3.1/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/jquery-easyui-1.3.1/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">
<!--
$(function(){
var $frmAddnew = $('#frmAddnew');
$frmAddnew.form({
onSubmit:function(){
alert('ok');return false;
},
success:function(data){
alert(data);
}
});
});
//-->
</script>
</head>
<body>
<form name="frmAddnew" method="post">
<input type="text" id="" />
<input type="submit" />
</form>
</body>
</html>
帮忙看下为什么这段代码中form的onSubmit不执行呢?谢谢!