2个回答
2013-07-07
展开全部
脚本代码function ispost()
{
if(event.ctrlKey && event.keyCode==13)
{
document.getElementById("<%=btnPost.ClientID %>").focus();
document.getElementById("<%=btnPost.ClientID %>").click();
}
}页面代码 <table width="417" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td height="20" colspan="2" align="right"> </td>
</tr>
<tr>
<td width="135" height="30" align="right">用户名:</td>
<td width="282" height="30"><input name="name" type="text" runat="server" onkeydown="submitloginclick() " class="INPUT" id="name" />
<a href="register.aspx" target="_blank">快速注册</a></td>
</tr>
<tr>
<td height="30" align="right">密 码:</td>
<td height="30"><input name="password" type="password" class="INPUT" runat="server" onkeydown="submitloginclick()" id="password" />
<a href="getPassword.aspx" target="_blank">忘记密码?</a></td>
</tr></table><asp:TextBox>也支持onkeydown="submitloginclick()" <asp:Button ID="btnPost" runat="server" Text="登 录" Height="20px"
onclick="btnPost_Click" Width="58px" />
{
if(event.ctrlKey && event.keyCode==13)
{
document.getElementById("<%=btnPost.ClientID %>").focus();
document.getElementById("<%=btnPost.ClientID %>").click();
}
}页面代码 <table width="417" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td height="20" colspan="2" align="right"> </td>
</tr>
<tr>
<td width="135" height="30" align="right">用户名:</td>
<td width="282" height="30"><input name="name" type="text" runat="server" onkeydown="submitloginclick() " class="INPUT" id="name" />
<a href="register.aspx" target="_blank">快速注册</a></td>
</tr>
<tr>
<td height="30" align="right">密 码:</td>
<td height="30"><input name="password" type="password" class="INPUT" runat="server" onkeydown="submitloginclick()" id="password" />
<a href="getPassword.aspx" target="_blank">忘记密码?</a></td>
</tr></table><asp:TextBox>也支持onkeydown="submitloginclick()" <asp:Button ID="btnPost" runat="server" Text="登 录" Height="20px"
onclick="btnPost_Click" Width="58px" />
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-07-07
展开全部
嗯,只能通过JS设置
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询