返回微博输入框一无......登陆

微博输入框一无图版 完整

**秒创2018-11-29 21:40:19254

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>微博输入框一无图版 完整</title>

<style type="text/css">

.weibo{width: 600px;height: 150px;border: 10px solid pink; margin: 0px auto; padding: 10px;}

.tu1{float: left;width: 180px;height: 24px; color: blue; padding-left: 15px;}

.weibo1{float: left;width: 120px; height: 24px;margin-left: 250px; text-align: right; font-size: 14px;color: #888;}

.weibo1 span{font-size: 16px;font-weight: bold;}

#text{width: 595px;height: 100px; border: 1px solid #888;}

#sp1,#sp2,#sp3,#sp4,#sp5,#sp6{float: left;width: 30px;height: 32px;line-height: 32px;padding-left: 26px; font-size: 14px;}

#sp5{width: 50px;}

#sp6{margin-left: 150px;}

#bt{float: right;width: 80px;height: 25px;border: none;background: #ffc09f;color: #fff;border-radius: 5px;}

</style>

<script type="text/javascript">

var text,number,zishu;

window.onload=function () {

text=document.getElementById('text');

number=document.getElementById('number');

bt=document.getElementById('bt');

text.onkeyup=function aa() {

m=140-text.value.length;//微博限制字数140字

if(m<0){

number.style.color="red";

            }else{

             number.style.color="#888";

            }

            number.innerHTML=m;

            }

bt.onclick=function () {

if(m==140){

alert("你还没有输入");

text.focus();

}else if(m<0){

alert("字数太多了,不能发布");

text.focus();

}else{

alert("发布成功");

}

}

aa();

}

</script>


</head>

<body>

<div>

<span>有什么新鲜事告诉大家?</span>

<div>还可以输入<span id="number"></span>字</div>

<textarea id="text"></textarea>

<span id="sp1">表情</span>

<span id="sp2">图片</span>

<span id="sp3">视频</span>

    <span id="sp4">话题</span>

    <span id="sp5">长微博</span>

    <span id="sp6">公开</span>

    <input type="button" value="发布" id="bt">




</div>


</body>

</html>


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送