JQuery对象转换成DOM对象
转换方法:转换方法有2种,一种是获得数组索引的方式,一种是通过get(第几个元素)方法的方式。
例子:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>将JQuery对象转换成DOM对象</title>
<script type="text/javascript" src="jquery-core/jquery-1.8.0.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//JQuery对象
var jqp1=$("#p1");
转换方法:转换方法有2种,一种是获得数组索引的方式,一种是通过get(第几个元素)方法的方式。
例子:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>将JQuery对象转换成DOM对象</title>
<script type="text/javascript" src="jquery-core/jquery-1.8.0.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//JQuery对象
var jqp1=$("#p1");