jqeury操作属性的几个方法,,老师我是来提高的,帮我通过下

Original 2018-12-16 13:24:14 167
abstract:<!DOCTYPE html><html><head> <title></title> <script type="text/javascript" src="jquery-3.3.1.min.js"></script> <style type="text/c

<!DOCTYPE html>

<html>

<head>

<title></title>

<script type="text/javascript" src="jquery-3.3.1.min.js"></script>

<style type="text/css">

.box{color: red;}

.main{font-size: 40px;font-weight: bold;}

</style>

</head>

<body>

<p title="ok">php中文网</p>

<script type="text/javascript">

$(document).ready(function () {

$('p').addClass('box main')

$('p').removeClass('box main')

$('p').attr('id','wrong')

alert( $('p').attr('id'))

alert(%('p').text)

})

</script>

</body>

</html>

老师我来提高的,帮我审核通过下

Release Notes

Popular Entries