开发者

What is the difference between JavaScript and jQuery [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 9 years ago.

开发者_运维知识库 Improve this question

Possible Duplicate:

What is the difference between jQuery and JavaScript?

Would please tell me the difference between Javascript and Jquery? I know about PHP and MySQL. Now,I want to learn JavaScript.


jQuery was written using JavaScript, and is a library to be used by JavaScript. You cannot learn jQuery without learning JavaScript.

Likely, you'll want to learn and use both of them.


JQuery is built on top of JavaScript.

JavaScript is pretty powerful, but can be difficult to program. jQuery is sort of a wrapper around JavaScript that makes it easier to program.

For example, instead of JavaScript's

document.getElementById('myDiv').style.backgroundColor="#FFF"

in jQuery you simply do

$('#myDiv').css('background-color','#FFF');

jQuery also simplifies stuff like XMLHttpRequests and such like. jQuery allows one to focus on the problem and not worry about what goes on in the underlying JavaScript too much.

That's my half-arsed attempt at explaining things. I'm sure someone can do better!


Jquery is Javascript's function. It's framework (library), which helps you (from Jquery's moto:) "Write less, do more"


the difference is javascript is a language and jquery is a library created by using javascript...

here is an excellent SO link with learning javascript resources https://stackoverflow.com/questions/11246/best-resources-to-learn-javascript


jQuery is a javascript framework that extends a lot of the basic functionality of javascript (better DOM traversal, animation stuff, cross-browser compatibility, etc).

The Wikipedia page gives a good explanation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜