javascript return true false Asp.net [英] javascript return true false Asp.net
本文介绍了javascript return true false Asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我有一个javascript,它会根据条件返回true或false
我是
后面的代码
ClientScript.RegisterStartupScript(typeof(Page),"starScript","function()",true);
我想如果它返回true,应该返回代码,否则返回false.
任何建议
Hello,
I have a javascript which returns true or false based on condition
i am code behind
ClientScript.RegisterStartupScript(typeof(Page), "starScript", "function()", true);
i want if it returns true thne it should come back to code else false.
Any suggestion
推荐答案
您的第三个参数是错误的...应该是脚本..
对于前.
< script>
//此处的函数
函数DoClick()
{
alert(''hi'');
}
</script>
您可以将其分配给字符串变量,并将其用作第三个参数.
然后调用该函数.
前任.
< input type ="button" value ="ClickMe"önclick="DoClick()"/>
如果您有任何澄清,请回复此...
如果您觉得有用,请标记它....
Hi,
ur third parameter is wrong... it should be the script..
for ex.
<script>
//ur function here
function DoClick()
{
alert(''hi'');
}
</script>
u may assign this to a string variable and use it as a third parameter.
then call that function.
ex.
<input type="button" value="ClickMe" önclick="DoClick()" />
if u have any clarifications, reply to this...
mark it if u find this useful....
这篇关于javascript return true false Asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文