62,272
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript">
//登录验证
function ValidateLog() {
alert(1);
return false;
}
//登录回调函数
function tips(data) {
debugger;
alert(data);
}
</script>
<body>
@using (Ajax.BeginForm("Index", "Home", new AjaxOptions { HttpMethod = "Post", OnSuccess = "tips", OnBegin = "return ValidateLog()" }))
{
<table border="0" cellpadding="0" cellspacing="0" class="chaxunbiaoge search_wh">
<tr>
<td height="55px" width="80px" align="right">
用户名:
</td>
<td width="175px">
<input type="text" name="userName" id="userName" class=" biaogechaxunkuang" tabindex="1" />
</td>
<td>
<span class="colore6080d marginleft10">*</span> <span class="spanUserName"></span>
</td>
</tr>
<tr>
<td height="55px" align="right">
密码:
</td>
<td>
<input type="password" name="passWord" id="passWord" class=" biaogechaxunkuang" tabindex="2" />
</td>
<td>
<span class="colore6080d marginleft10">*</span><span class="spanPassWord"></span>
</td>
</tr>
<tr>
<td height="55px" align="right">
</td>
<td>
<input name="btnlogin" type="submit" class="marginleft10 btn_dl" value="登录" tabindex="3" style="margin-top: 14px;" />
</td>
<td>
</td>
</tr>
</table>
}
</body>
<script type="text/javascript">
//登录验证
function ValidateLog() {
alert(1);
return false;
}
//登录回调函数
function tips(data) {
debugger;
alert(data);
}
</script>
<body>
@using (Ajax.BeginForm("Index", "Home"))
{
<table border="0" cellpadding="0" cellspacing="0" class="chaxunbiaoge search_wh">
<tr>
<td height="55px" width="80px" align="right">
用户名:
</td>
<td width="175px">
<input type="text" name="userName" id="userName" class=" biaogechaxunkuang" tabindex="1" />
</td>
<td>
<span class="colore6080d marginleft10">*</span> <span class="spanUserName"></span>
</td>
</tr>
<tr>
<td height="55px" align="right">
密码:
</td>
<td>
<input type="password" name="passWord" id="passWord" class=" biaogechaxunkuang" tabindex="2" />
</td>
<td>
<span class="colore6080d marginleft10">*</span><span class="spanPassWord"></span>
</td>
</tr>
<tr>
<td height="55px" align="right">
</td>
<td>
<input name="btnlogin" type="submit" class="marginleft10 btn_dl" value="登录" tabindex="3" style="margin-top: 14px;" />
</td>
<td>
</td>
</tr>
</table>
}
</body>
<script>
$('#btnlogin').click(function(){
return ValidateLog();
})
</script>
