Onclient单击asp.net [英] OnclientClick in asp.net
问题描述
您好,先生,我使用一个按钮,第一次单击时,我正在更改text = change emailid
对于第二次单击text = update emailid,我该如何为第二次单击编写Java脚本..
hi sir i am using one button ,for first click i am changing the text=change emailid
and for second click text=update emailid,how i have to write the java script for second click..
推荐答案
我认为这不是一个好的设计但我仍然会尝试为您提供解决方案.
I don''t think this is a good design but still I will try to give you a solution.
var clickCount = 0; //this should be a global variable
function func()
{
if(clickCOunt == 0)
{
//set the text to enter email
clickCount++;
}
else
{
//set the text to UPDATE email
}
}
我希望我对这个问题的理解是正确的.如果没有,请告诉我,我将尝试完善答案.
I hope my understanding on the question is correct. if not do let me know and I will try to refine the answer.
当我收到您的问题时…….
As i got your question.......
< script type ="text/javascript">
函数ClearData(){
document.getElementById("lblMsg").innerHTML ='''';
}
</script>
在按钮的属性"OnClientClick"上传递此
<script type="text/javascript">
function ClearData() {
document.getElementById("lblMsg").innerHTML = '''';
}
</script>
Pass this
ClearData()
ClearData()
,我认为您会得到答案. ...
如果无法澄清问题,请.....
on your button''s properties "OnClientClick" and i think u will get the answer....
If not clarify the question please.....
请完整地写下您的问题.
please write your problem completelly.
这篇关于Onclient单击asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!