DDR爱好者之家 Design By 杰米
可在服务器端加载方法:
复制代码 代码如下:
private void OnLoading()
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append(" function pageLoad(){var manager = Sys.WebForms.PageRequestManager.getInstance(); ");
sb.Append(" manager.add_beginRequest(OnBeginRequest); manager.add_endRequest(OnEndRequest)} var lcPostbackElementID;");
sb.Append(" function OnBeginRequest(sender, args){ lcPostbackElementID = args.get_postBackElement().id.toLowerCase(); if (lcPostbackElementID === \"btnadwords\"){$get(\"btnAdWords\").disabled = true; $get(\"btnAdWords\").value='正在提交...';}} ");
sb.Append(" function OnEndRequest(sender, args){if (lcPostbackElementID === \"btnadwords\"){ $get(\"btnAdWords\").disabled = false; $get(\"btnAdWords\").value='确定';}} ");

ScriptManager.RegisterStartupScript(Page, Page.GetType(), "btnAdWords", sb.ToString(), true);
}

也可直接写在页面脚本里:
复制代码 代码如下:
<script>
function pageLoad()
{
var manager = Sys.WebForms.PageRequestManager.getInstance();
manager.add_beginRequest(OnBeginRequest);
manager.add_endRequest(OnEndRequest)
}
var lcPostbackElementID;
function OnBeginRequest(sender, args)
{
lcPostbackElementID = args.get_postBackElement().id.toLowerCase();
if (lcPostbackElementID === 'btnadwords')
{
$get('btnAdWords').disabled = true;
$get('btnAdWords').value='正在提交...';
}
}
function OnEndRequest(sender, args)
{
if (lcPostbackElementID === \"btnadwords\")
{
$get('btnAdWords').disabled = false;
$get('btnAdWords').value='确定';
}
}
< /script>

更多内容请参考:http://msdn.microsoft.com/zh-cn/magazine/cc163319.aspx
DDR爱好者之家 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
DDR爱好者之家 Design By 杰米