日期:2014-05-17 浏览次数:20390 次
<asp:Button ID="btn" ClientIDMode ="Static" runat ="server" Text ="测试点击后不可用" ValidationGroup ="test" OnClientClick="this.disabled='true'" OnClick="TestThis" />
Protected Sub TestThis (sender as object, e as eventargs)
数据CRUD操作....
End Sub
<script language="javascript">
function abc()
{
var mybutton=document.getElementById("Submit1");
mybutton.disabled=true; //变灰
__doPostBack("Submit1",""); //执行服务器端Submit1的click事件
}
</script>
<form id="Form1" method="post" runat="server">
...
<INPUT id="Submit1" type="submit" value="开始上传" name="Submit1" runat="server">
....
</form>
$("input[type='submit']").each(function ()
{
$(this).bind("click", function ()
{
$(this).attr("disabled", true);
$(this).parents().filter("form").trigger("submit");
});
});