如何在子页面上设置JavaScript [英] how to set javascript on child page
本文介绍了如何在子页面上设置JavaScript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两页
母版页和子页.
如何在子页面上设置JavaScript?
我想使用子页面上的javascript将文本框检查为数值.
I have two page
Master page and child page.
How can I set javascript on child page?
I want to check textbox to numeric value using javascript on child page.
推荐答案
你可以尝试
.aspx页面编写javascript函数,如
Hi,
you can try it
.aspx page write javascript function like
<script type="text/javascript">
function chkEmail() {
alert('here implement textchange functions');
}
<script>
在正文文本框中
in body textbox
<asp:textbox id="TextBox1" runat="server" onblur="return chkEmail();" xmlns:asp="#unknown">
每当您进行文字更改时,它都能正常工作
快乐的编码.........</script></script>
when ever you textchange it can working fine
happy coding.........</script></script>
将ScriptManager
添加到MasterPage并将ScriptManagerProxy
添加到子页面中(如使用)像往常一样.
AddScriptManager
to MasterPage and Add theScriptManagerProxy
to the child page as use as normal.
请参阅,
http://www.dotnetcurry.com/ShowArticle.aspx?ID=273 [ ^ ]
http://www.dotnetcurry.com/ShowArticle.aspx?ID=274 [ ^ ]
Refer this,
http://www.dotnetcurry.com/ShowArticle.aspx?ID=273[^]
http://www.dotnetcurry.com/ShowArticle.aspx?ID=274[^]
这篇关于如何在子页面上设置JavaScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文