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

我的學(xué)習(xí)作業(yè)

原創(chuàng) 2019-03-13 22:36:28 231
摘要:<!DOCTYPE html> <html dir="ltr">   <head>     <meta charset="utf-8">     <title>微博<
<!DOCTYPE html>
<html dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>微博</title>
    <style media="screen">
      .b1{width:600px;height:160px;border:10px solid pink;margin:0px auto;padding:10px;}
      img{float:left;}
      #text{width:600px;height:100px;border:1px solid #888;margin-top:5px;}
      .b2{float:right;font-size:14px;color:#888;margin-right:5px;}
      span{font-size:13px;}
      #s1,#s2,#s3,#s4,#s5,#s6{float: left;width: 30px;height: 32px;line-height: 32px;padding-left: 26px;}
      #s1{background: url(images/an5.png) no-repeat left center;}
      #s2{background: url(images/an4.png) no-repeat left center;}
      #s3{background: url(images/an3.png) no-repeat left center;}
      #s4{background: url(images/an2.png) no-repeat left center;}
      #s5{background: url(images/an1.png) no-repeat left center;width: 40px;}
      #s6{ margin-left: 158px;margin-right:15px;color: #888; }
      #fb{width: 80px;height: 30px;border: none;background: #ffc09f;color: #fff;border-radius: 5px;}
      #num{font-size:16px;font-weight:bold;}
    </style>
  </head>
  <body>
    <div>
      <img src="./images/12.png" alt="">
      <div>
        還可以輸入<span id="num"></span>字
      </div>
      <textarea id="text"></textarea>
      <span id="s1">表情</span>
      <span id="s2">圖片</span>
      <span id="s3">視頻</span>
      <span id="s4">話題</span>
      <span id="s5">長(zhǎng)微博</span>
      <span id="s6">公開</span>
      <input type="button" id="fb" onclick="cc()" value="發(fā)布">
    </div>
  </body>
  <script type="text/javascript">
    var text,num,m;
    window.onload=function(){
      text=document.getElementById('text');
      num=document.getElementById('num');
      text.onkeyup=function aa(){
        m=140-text.value.length;
        if(m<0){
          num.style.color="red";
        }else{
          num.style.color="#888";
        }
        num.innerHTML=m;
      }
    }
    function cc(){
      if(m==140){
        alert("你還沒(méi)有輸入");
      }else if(m<0){
        alert("字?jǐn)?shù)太多,發(fā)布失敗");
      }else{
        alert("發(fā)布成功");
      }
    }
  </script>
</html>


批改老師:韋小寶批改時(shí)間:2019-03-14 09:15:24
老師總結(jié):這一篇也是和上一篇差不多 外在復(fù)習(xí)了js部分的知識(shí)了 沒(méi)事就是要這樣去多練習(xí)練習(xí)

發(fā)佈手記

熱門詞條