DOM对象和jQuery对象转化
<html> <head> <script type="text/javascript"> /*function getInnerHTML() { alert(document.getElementById("tr1").innerHTML); }*/ </script> <script type="text/javascript" src="jquery-1.11.1.min.js"></script> <script type="text/javascript"> var $sc = $("#tr1"); var cr = $sc.get(0); alert(cr); </script> </head> <body> <table border="1"> <tr id="tr1"> <th>Firstname</th> <th>Lastname</th> </tr> <tr id="tr2"> <td>Peter</td> <td>Griffin</td> </tr> </table> <input type="button" onclick="getInnerHTML()" value="Alert innerHTML of table row" /> </body> </html>
纯小白,请问alert(cr)中的cr指的是什么,为什么网页上弹出的对话框显示Undifined