日期:2014-05-17 浏览次数:20397 次
<script language="JavaScript"> $(document).ready(function () { $(".imgbutton").toggle(function () { $(this).removeClass("imgbutton").addClass("imgbutton2"); $(this).attr("value","1"); }, function () { $(this).removeClass("imgbutton2").addClass("imgbutton"); $(this).attr("value","0"); }); }); </script> <body> <form id="form1" runat="server"> <div> <input type="button" id="t1p1z11" runat="server" class="imgbutton" value="0"> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> </div> </form> </body>
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { } } protected void Button1_Click(object sender, EventArgs e) { string b = this.t1p1z11.Value.ToString(); }