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

各種選擇器會(huì)用,但是還不熟練

original 2018-12-17 15:22:31 221
abstrait:<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>index</title></head><body > <div >     

QQ圖片20181217152117.png

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>index</title>
</head>
<body >
 <div >
      <div style="float: right;margin-right: 25px">
          <img src="./img/微信圖片.jpg" name="pic" >
      </div>
      <div style="float: right;">
          <form action="" name="register">
                  <input type="text" placeholder="用戶(hù)名" ><br>
                  <input type="password" placeholder="密碼不少于8位" ><br>
                  <button>提交</button>
          </form>
    </div>
 </div>
 <script type="text/javascript">
    //通過(guò)class獲取元素
    let info= document.getElementsByClassName('info').item(0);
    info.style.backgroundColor='black';
    info.style.width='100%';
    info.style.height='200px';
    //通過(guò)name獲取元素
    let pic=document.getElementsByName('pic').item(0);
    pic.style.width='200px'
    //通過(guò)標(biāo)簽名和name來(lái)獲取元素
    document.images[0].style.height="200px";
    //通過(guò)css選擇器來(lái)獲取元素
    let input=document.querySelectorAll('input');
    for(let i=0;i<input.length;i++){
         input[i].style.marginRight='25px';
         input[i].style.marginTop='15px';
         input[i].style.width='200px';
         input[i].style.height='25px';}
 </script>
</body>
</html>

Professeur correcteur:天蓬老師Temps de correction:2018-12-17 15:25:35
Résumé du professeur:好吧, 相信你, 下一次 ,作業(yè)會(huì)更好

Notes de version

Entrées populaires