<div class="codetitle"> <span><a style="CURSOR: pointer" data="77831" class="copybut" id="copybut77831" onclick="doCopy('code77831')"><u>复代码</u></a></span> 代码如下:</div> <div class="codebody" id="code77831"> <br><!DOCTYPE HTML> <br><html> <br><머리> <br><meta charset="utf-8"> <br><title>微博发布jq版</title> <br><meta name="키워드" content=""> <br><meta name="Description" content=""> <br><script src="http://code.jquery.com/jquery-1.8.0.min.js" type="text/javascript"></script> <br><style type="text/css"> <br>/*중화{*/ <br>html{color:#000;배경:#fff;} <br>body,div,ul,li,h1,input,button,textarea{padding:0;margin :0;} <br>img{border:0;} <br>li{list-style:none;} <br>/*}중*/ <br>h1{margin:20px auto 0;font-size :30px;width:200px;text-align:center;color:blue;} <br>#outer{position:relative;width:400px;margin:auto;margin:20px auto 10px;} <br>#test1{display :block;width:400px;height:70px;} <br>.error{배경:#f00;width:400px;height:50px;position:absolute;left:1px;top:10px;opacity:0.6;filter:alpha (불투명도=60);} <br>#test2{display:block;margin-left:800px;width:60px;height:30px;font-size:20px;} <br>.test3{margin:10px auto;width :400px;} <br>#test3{border:1px #444 solid;width:400px;min-height:300px;_height:300px;padding-bottom:10px;color:blue;float:left;} <br>. 테스트{border-bottom:1px blue dotted;width:383px;padding:10px 5px 5px 10px;float:left;} <br>.inf{margin-top:15px;float:right;color:#555;} <br>.con{margin-left:16px;display:inline;width:304px;float:left;word-break:break-all;} <br>.bu{margin-left:6px;display:inline;} <br>.imgs{너비:60px;높이:60px;float:왼쪽;} <br>.imgInf{너비:120px;배경:#f0f;색상:#fff;위치:absolute;z-index:2;왼쪽:- 65px;top:62px;opacity:0.5;filter:alpha(opacity=50);} <br>.finish{배경:green;width:300px;height:50px;color:#ff0;font-size:30px;text -align:center;line-height:50px;position:absolute;left:50px;top:10px;opacity:0.6;filter:alpha(opacity=60);} <br>.imgOut{position:relative;} <br><br></style> <br></head> <br><본문> <br><h1>微博发布</h1> <br><div id="outer"> <br><textarea id="test1" ></textarea> <br></div> <br><input type="button" id="test2" value="发布"/> <br><div class="test3"><div id="test3"></div></div> <br><br><script type="text/javascript"> <br><!-- <BR>$('#test2').click(function(){ //특별한 일 <BR>if($('#test1')[0].value== ""){ <BR>var final=$('<div class="error"></div>').appendTo($('#outer')).hide().fadeIn(200) .fadeOut(200).fadeIn(200).fadeOut(200); <br>return; <br>}else{ <br>$('#test2')[0].disabled=true; ,禁止 <br>var 타이머=new Date() <br>//微博 <br>$('<div class="test"><span class="imgOut"><img src ="images/wukong.gif" class="imgs"/></span><div class="con"></div><div class="inf">' () "시간" 타이머.getMinutes() "분" 타이머.getSeconds() "秒" '<input type="button" value="删除" class="bu"/></div>< /div>').prependTo($('#test3')) <br>$('.con')[0].innerText=$('#test1')[0].value <br>/ /头image信息 <br>$('.imgs:eq(0)').hover( <br>function(){$('<ul class="imgInf"><li>이름자:悟空< /li><li>称号:战斗圣佛</li><li>现居:꽃果山</li></ul>').appendTo($(this).parent() );}, <br>function(){$('.imgInf').remove();} <br>) <br>//清공 <br>$('#test1')[0].value= ""; <br>//发布成功时动画 <br>$('<div class="finish">发布成功</div>').appendTo($('#outer')).hide(). fadeIn(500).fadeOut(500,function(){$('#test2')[0].disabled=false;}); <br>//插入节点时的动画效果 <br>$('.test:first').hide().slideDown("slow"); <br>//删除按钮的事件 <br>$('.bu:eq(0)').click(function(){ <br>if(confirm('确determin删除吗?')){ <br> $(this).parent().parent().hide(1000,function(){ <br>$(this).remove(); <br>}) <br>} <br>}); <br>} <br>}) <br>//--> <br></script> <br></body> <br></html> <br> </div>