<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<script type="text/javascript" src="../js/jquery-1.8.0.js"></script>
</head>
<body>
<script type="text/javascript">
/*DOM 对象转成 jQuery 对象 示例*/
$(document).ready(function() {
var div=document.getElementById("mydiv");
alert(div.title);
alert(div.children.prototype);
var $div2=$(div);
$div2.click(function(){
alert("click function!!!");
});
});
</script> <div id="mydiv" title="mydiv_title">
<p>hello jquery</p>
</div>
</body>
</html>
  

  

05-11 19:35