本文介绍了使用模型poppup时如何触发文本更改事件......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我用过模型弹出扩展器...
我用的是窗板.
现在我需要在隐藏弹出窗口时触发文本更改事件.
但是当我使用此代码时onclick事件正在工作....


document.forms ["aspnetForm"].elements ["ctl00_ContentPlaceHolder1_btnClick"].click()


我需要文本更改事件....


i have used model popup extender ...
and i used panel for window.
now i need to fire the text changed event when i hide the popup window.
but onclick event is working when i use this code ....


document.forms["aspnetForm"].elements["ctl00_ContentPlaceHolder1_btnClick"].click()


i need text changed event....

推荐答案

// to register the ASP.NET server control
Page.GetPostBackEventReference(txtBox1);

//event to fire the TextChanged event of txtBox1
__doPostBack("txtBox1", "TextChanged");

// JavaScript function to handle the situation when the user just wanted to type
function DoPostBack()
{
   __doPostBack("txtBox1", "TextChanged");
}

//function on the OnChange event
if(!IsPostback)
{
    /...Implementation.../
    txtBox1.Attributes.Add("OnChange", "javascript:return DoPostBack()")
}



这篇关于使用模型poppup时如何触发文本更改事件......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 11:25
查看更多