如何在html中调用jquery函数? [英] how to call the jquery funtion in html ?

查看:374
本文介绍了如何在html中调用jquery函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在html中调用jquery函数?

how to call the jquery funtion in html?

推荐答案

如果你问如何在Javascript中调用函数,我会很奇怪,但是会有所帮助。答案是:jQuery是一个Javascript库,不多也不少,所以该函数的调用方式与Javascript相同。但也许你没有正确表达自己,只需要知道如何正确地引导jQuery代码。尽管答案将再次与Javascript和HTML一样,但最好还是阅读:

http://learn.jquery.com/about-jquery/how-jquery-works [ ^ ]。



你应该明白脚本放了作为HTML的< body> 元素的子元素会在加载时自动调用;这个脚本将作为一个入口点。当然,调用可以作为触发元素事件的元素属性添加: http://en.wikipedia.org/wiki/DOM_events [ ^ ]。





-SA
If you asked how to call a function in Javascript, I would be weird, but would make some sense. The answer would be: jQuery is a Javascript library, no more no less, so the function is called the same way as in Javascript. But perhaps you did not express yourself properly and just need to know how a jQuery code can be properly "bootstrapped". Even though the answer would be again "the same way as always with Javascript and HTML", it's good to read this:
http://learn.jquery.com/about-jquery/how-jquery-works[^].

You should understand that the script put as a child of the <body> element of your HTML is automatically called on load; this script will work as an entry point. And of course the call could be added as the element attributes triggering element events:http://en.wikipedia.org/wiki/DOM_events[^].


—SA


这篇关于如何在html中调用jquery函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆