使用母版页的页面中调用脚本函数 [英] Call script functions in page that uses of masterpage
本文介绍了使用母版页的页面中调用脚本函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何通过单击bottun或在BodyContent加载时调用函数
How can I call functions by click a bottun or in onload of BodyContent
where I use of masterpage?
推荐答案
我假设您想在单击基本HTML和javascript中的按钮时知道如何调用函数.
在< head>中标签,请执行以下操作:
I assume that you want to know how to call a function when you click a button in basic HTML and javascript.
In the <head> tag, do the following:
<script language="javascript">
//This is your function
function FunctionName ()
{
//Do something
}
</script>
现在假设您有一个按钮.由于要在单击该按钮时调用该函数,因此必须在"onClick"属性中传递函数名称,如下所示.
Now let''s assume that you have a button. Since you want to call that function when you click that button, you must pass the function name in the "onClick" attribute as below.
//Your button
<input type="button" value="Click me" önclick="javascript:FunctionName();" />
那应该确保每当您单击该按钮时都调用该函数.希望对您有所帮助.
That should make sure that the function is called whenever you click that button. Hope this helped.
您在这里要求非常基本的内容.容易找到.
->下次自己使用Google. [ ^ ]
You asking for very basic stuff here. Easy to find.
--> Google yourself next time.[^]
这篇关于使用母版页的页面中调用脚本函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文