亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

JQuery操作屬性作業(yè)

??? 2018-11-07 21:55:30 216
????:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> .box{ width:100px; height:100p
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
.box{
width:100px;
height:100px;
border:1px solid black;
}
.box1{background-color:red;}
.aa{color:red;font-size:30px;}

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

</script>
</head>
<body>
<div></div>
<input type="text" name="user">
<input type="" value="hello,world">
<p>hello world!~~~</p>
<button id="bt">啪啪</button>
<button id="bt1">不hello點我</button>
<br>
<i>傾斜</i>
<input type="button" value="變成標(biāo)題點我" id="bt3">
<br>
<input type="button" value="還想變標(biāo)題?" id="bt4">
<script type="text/javascript">
$(document).ready(function(){
$('div').addClass('box box1')
$('div').removeClass('box1')
$('.text').attr('type','password')
// $('input').removeAttr('value')
alert($('input').hasClass('text'))


$('#bt').click(function(){
$('p').toggleClass('aa')
})
$('#bt1').click(function(){

$('p').text('哈嘍,世界')
})
$('#bt3').click(function(){
$('i').html('<h1>我已經(jīng)變成了標(biāo)題</h1>')
})
$('#bt4').click(function(){
$('#bt3').val('我還是能變成標(biāo)題')
})
})


</script>
</body>
</html>

以我現(xiàn)在的知識面,感覺屬性的操作好像有點多此一舉??赡苁沁€未深入學(xué)習(xí),所以還不能體會這些功能的妙處

??? ??

?? ??