前台:
<ul>
<li class="button_lg" onclick="JAVAscript:document.getElementById('<%=Button1.ClientID %>').click()">登 录 </li>
</ul>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click1" />后台:
protected void Button1_Click1(object sender, EventArgs e)
{
string action = Request.Form["action"];
if (null != action)
{
switch (action)
{
case "first":
{
UserLogin();
break;
}
case "second":
{
CooperatorLogin();
break;
}
}
}
}我在后台这个单击事件上作了断点,不能运行到这边
<ul>
<li class="button_lg" onclick="JAVAscript:document.getElementById('<%=Button1.ClientID %>').click()">登 录 </li>
</ul>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click1" />后台:
protected void Button1_Click1(object sender, EventArgs e)
{
string action = Request.Form["action"];
if (null != action)
{
switch (action)
{
case "first":
{
UserLogin();
break;
}
case "second":
{
CooperatorLogin();
break;
}
}
}
}我在后台这个单击事件上作了断点,不能运行到这边
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{ } protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("ok");
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<ul>
<li class="button_lg" onclick="JAVAscript:document.getElementById('<%=Button1.ClientID %>').click()">
登 录 </li>
</ul>
</div>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
</form>
</body>
</html>
上面的代码都测试过了
要用
style="display:none"
style="cursor:hand"
其他标准浏览器都是style="cursor:pointer"