JQUERY知识点.pdfVIP

  • 12
  • 0
  • 约1.14万字
  • 约 7页
  • 2017-09-23 发布于广东
  • 举报
基于属性的选择器 几乎所有元素都具有属性,比如:在 HTML 中,几乎所有元素 都具有属性,比如: 1. 2. 上面两个 HMTL 元素中包含了九个属性。利用 jQuery ,我们可以根据元素的属性和 属性值来对元素进行选择。一起看看以下例子中的选择器: 3. $(document).ready(f unction(){ 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. //Alltheinputswhosenameendswithemail 22. 23. 24. 25. 26. 27. 28. 29. }); }); alert(Thisinputhasanamewhichendswithemail.); $(input[name$=email] ).focus(function(){ }); alert(Youvejustselectedanimagewhosewidthisnot600p x); $(img[width!=600]).click(function(){ //Alltheimageshavingawidthdiffer entto600px }); alert(Youvejustselectedanimagewhosewidthis60

文档评论(0)

1亿VIP精品文档

相关文档