如下所示:
!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN ' ' http://www .w3。org/TR/XHTML L1/DTD/XHTML L1-过渡。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=' http : jquery-1。7 .1 .量滴js '/script脚本类型=' text/JavaScript '窗口。onload=function(){ document。getelementbyid(' btnOk ').onclick=function(){ $(' div,p ').html(' PHP ');};};/脚本/头体div id=' div 1 ' div 1/div HR/div 2/div HR/p杨/p输入类型='button' id='btnOk '值='确定//正文/html
以上这篇jquery基本选择器匹配多个元素的实现方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持我们。