手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >jquery基本选择器匹配多个元素的实现方法
jquery基本选择器匹配多个元素的实现方法
摘要:如下所示:newdocumentwindow.onload=function(){document.getElementById('btnO...

如下所示:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> new document </title> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <style type="text/css"></style> <script type="text/javascript" src="jquery-1.7.1.min.js"></script> <script type="text/javascript"> window.onload=function(){ document.getElementById('btnOk').onclick=function(){ $(' div,p ').html('php'); }; }; </script> </head> <body> <div id="div1">div1</div> <hr/> <div>div2</div> <hr/> <p>杨</p> <input type="button" id='btnOk' value='确定' /> </body> </html>

jquery基本选择器匹配多个元素的实现方法1

以上这篇jquery基本选择器匹配多个元素的实现方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持查字典教程网。

【jquery基本选择器匹配多个元素的实现方法】相关文章:

jQuery子窗体取得父窗体元素的方法

jQuery判断一个元素是否可见的方法

JQuery中属性过滤选择器用法

在JS方法中返回多个值的方法汇总

jQuery判断指定id的对象是否存在的方法

jquery预加载图片的方法

jQuery取消ajax请求的方法

JQuery中上下文选择器实现方法

JavaScript判断数组是否包含指定元素的方法

jQuery处理图片加载失败的常用方法

精品推荐
分类导航