JQuery 面试题(从初学者到高级)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3553482/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JQuery Interview Question(From Beginners till Advance)
提问by Amy B
This may be a stupid question but however I searched in google with
这可能是一个愚蠢的问题,但我在谷歌搜索
"jquery interview questions" which didnot worked out much except for
“jquery 面试问题”,除了
JQuery Interview Questionsand few sites with almost the sismilar question pattern(which are ultimately very basic).
JQuery 面试问题和几乎相同问题模式的几个站点(最终是非常基本的)。
Is there any good site where I can get JQuery questions starting from basic to advance.
有没有什么好的网站可以让我从基础到高级的 JQuery 问题。
Thanks
谢谢
回答by Amy B
If you hire someone based on a library, there is a serious problem there.
如果您根据图书馆雇用某人,则那里存在严重问题。
To be an "expert at jQuery", good knowledge of JavaScript is needed, since that's the language. Someone good at JavaScript should be able to pick up anylibrary within a few days. Besides, jQuery isn't exactly brain surgery and most IDEs have support for it built in.
要成为“jQuery 专家”,需要对 JavaScript 有很好的了解,因为这是语言。精通 JavaScript 的人应该能够在几天内学会任何库。此外,jQuery 并不完全是脑外科手术,大多数 IDE 都内置了对它的支持。
回答by Sandy Vanderbleek
It's not a question of hiring someone based on a library, but based on what they say they know. They claim to know jQuery, you want to assess that statement. In addition jQuery integrates JavaScript with CSS selectors and ideas about method chaining and iteration that have nothing to do with being a good JavaScript developer, except insomuch as a good JavaScript developer should know jQuery.
这不是基于图书馆雇用某人的问题,而是基于他们所说的他们所知道的。他们声称了解 jQuery,您想评估该声明。此外,jQuery 将 JavaScript 与 CSS 选择器以及有关方法链和迭代的想法集成在一起,这些想法与成为一名优秀的 JavaScript 开发人员无关,只是一个优秀的 JavaScript 开发人员应该了解 jQuery。
回答by Ben Rowe
Just a couple of ideas off the top of my head
只是我脑子里的几个想法
Basic
基本的
- Provide an example of how to bind a click event to all paragraphs, except the last one (covers basic dom selection & event handling)
- Example of how to fade in a div from an invisible state
- 提供一个如何将点击事件绑定到除最后一个之外的所有段落的示例(涵盖基本的 dom 选择和事件处理)
- 如何从不可见状态淡入 div 的示例
Advanced
先进的
- Write an selector filter to return only nodes with lower case values.
- 编写一个选择器过滤器以仅返回具有小写值的节点。
ie
IE
$.expr[':'].lowercaseOnly = function(el, i, m) {
...
}
I also agree with @Coronatus answer. A good jQuery developer should have a solid knowledge of js.
我也同意@Coronatus 的回答。一个好的 jQuery 开发人员应该对 js 有扎实的了解。
回答by Anurag
It's easy to pick up jQuery if a developer has good understanding of JavaScript. You could ask questions where there is a strong overlap. Some not so common questions I can think of:
如果开发人员对 JavaScript 有很好的理解,那么上手 jQuery 很容易。您可以在有强烈重叠的地方提出问题。我能想到的一些不太常见的问题:
Implementing a function like
ready
for an external resource that is loaded only once. It must behave exactly like jQuery's ready function. If the resource is not yet loaded, it adds the callback function to be called later. Otherwise, it calls the callback immediately. Fire all stored callbacks when the resource loads.What are special eventsin jQuery, and where can they be used? Maybe make up an example of a composite touch event such as tap, and drag at the same time using two fingers.
ready
为仅加载一次的外部资源实现类似的功能。它的行为必须与 jQuery 的 ready 函数完全一样。如果资源尚未加载,则添加稍后调用的回调函数。否则,它会立即调用回调。当资源加载时触发所有存储的回调。什么是jQuery中的特殊事件,它们可以在哪里使用?也许构成一个复合触摸事件的示例,例如点击,并使用两个手指同时拖动。
回答by Eenvincible
I recently put together an extensive list of jQuery Interview Questions. I still agree with most of the top answers here that jQuery is really not what you should base your skills on. That being said, here is a link to some of my favorite interview questions you should expect when trying to find a job in the industry where jQuery is being used.
我最近整理了一个广泛的 jQuery 面试问题列表。我仍然同意这里的大多数顶级答案,即 jQuery 确实不是您应该基于的技能。话虽如此,这里是我最喜欢的一些面试问题的链接,当您试图在使用 jQuery 的行业中寻找工作时,您应该期待。
Commonly asked jQuery questions
Good luck!
祝你好运!
回答by tekkieguy
They probably want a good understanding of the api concepts (http://api.jquery.com/). Some grasp of how ajax and javascript work is also useful as mentionned above.
他们可能想要很好地理解 api 概念(http://api.jquery.com/)。如上所述,了解 ajax 和 javascript 的工作原理也很有用。