1 | dojo.query("img"); |
1 | dojo.query("#widget123"); |
1 | dojo.query(".offToSeeTheWij"); |
1 2 3 4 5 6 7 | var list = []; var nodes = document.getElementsByTagName("*"); for(var x = 0; x < nodes.length; x++){ if(nodes[x].className == "progressIndicator"){ list.push(nodes[x]); } } |
1 | dojo.query("div.someClassName"); |
1 | dojo.query("h1,h2,h3"); |
1 | dojo.query("tbody tr:nth-child(odd)"); |
1 | dojo.query("p:first-child"); |
1 2 3 | dojo.query("[name^=item]"); dojo.query("[name$=item]"); dojo.query("[name*=item]"); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <html> <head> <script type="text/javascript" src="../js/dojo/dojo.js"></script> <script type="text/javascript"> dojo.addOnLoad(function() { console.debug(dojo.query("button").length); // 输出"3" console.debug(dojo.query("button", "thisForm").length); // 输出”1” }); </script> </head> <body> <button id="b1" /> <button id="b2" /> <form id="thisForm" > <button id="formB" /> </form> </body> </html> |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |