function initiate()
{
$("p").text("Hi", Hello());
}
function Hello()
{
alert("Hello, you have called another function");
}
HTML:
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button onclick="initiate()">Click me</button>
现在脚本在单击按钮时调用函数initial(),然后调用另一个函数Hello(),同时将html中的所有段落更改为“Hi”。
我想要的是函数 Initiate() 将使用 jQuery 调用函数 Hello(),并且什么也不做。
(换句话说,我如何简单地使用 jQuery 调用函数?)