联系我们
简单又实用的WordPress网站制作教学
当前位置:网站首页 > 网页前端技术 > 正文

jquery基本选择器匹配多个元素的实现方法 - Web前端

作者:98wpeu发布时间:2026-08-18分类:网页前端技术浏览:3


导读:如下所示:<!DOCtypehtmlPUBLIC"-//W3C//DTDxhtml1.0Transitional//EN""http://www.w3.o...

如下所示:

<!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基本选择器匹配多个元素的实现方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

标签:多个元素方法选择器Webjquery


网页前端技术排行
最近发表
网站分类
标签列表