龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > Javascript编程 >

JavaScript制作新浪网易的评论块(1)(3)

时间:2013-03-06 14:58来源:未知 作者:admin 点击:
分享到:
!DOCTYPEhtmlPUBLIC-//W3C//DTDXHTML1.0Transitional//ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns = http://www.w3.org/1999/xhtml head title UntitledPage / title script type = tex

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
  2. <html xmlns="http://www.w3.org/1999/xhtml" > 
  3. <head> 
  4.     <title>Untitled Page</title> 
  5.     <script type="text/javascript" language="javascript"> 
  6.      
  7. function xx()  
  8. {  
  9.  window.frames["iframe1"].document.designMode='on';  
  10. }  
  11.  function  xxx()  
  12.  {  
  13.     window.frames["iframe1"].document.getElementById("xxx").innerHTML+='<img title="顶" alt="顶" src="http://www.sinaimg.cn/uc/myshow/blog/misc/gif/E___0104ZHWSSIGT.gif" _moz_dirty="">';  
  14.   }  
  15.     
  16. function openTab()  
  17. {  
  18.   var newwindow = window.open("tab.htm",'_blank', toolbars=0,resizable=1);  
  19.   newwindow.focus();  
  20. }  
  21. function   InsertEmotion(content)  
  22. {  
  23. document.getElementById("TextArea1").value+=content;  
  24.  window.frames["iframe1"].document.getElementById("xxx").innerHTML+='<img title="顶" alt="顶" src="'+content+'" _moz_dirty="">';  
  25. }  
  26.     </script> 
  27. </head> 
  28. <body onload="xx()"> 
  29. <iframe frameborder="0" src="HTMLPage1.htm" style="border: 1px solid rgb(199, 199, 199); height: 158px; width: 448px; background-color: white;" id="iframe1"></iframe> 
  30.  
  31. <div> 
  32.     <textarea id="TextArea1" style="height:150px;display:none;" cols="20" rows="2"></textarea> 
  33.     <input id="Button2"  type="button" value="提交" /> 
  34. <!--    <input id="Button1" type="button" value="button" onclick="return xxx()" />--> 
  35.     <input id="Button3" type="button" value="选择表情" onclick="openTab()" /> 
  36.     </div> 
  37. </body> 
  38. <!--<img src="http://www.rao123.com.cn/uploadfile/200912/20100113132913201.gif" alt="" />--> 
  39. </html> 
  1. <html> 
  2.     <head> 
  3.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
  4.         <style> 
  5.             p {   
  6.                 * margin:0.2em  auto;  
  7.             }  
  8.             body {  
  9.                 margin: 0;  
  10.                 scrollbar-face-color: #ffffff;  
  11.                 scrollbar-highlight-color: #ffffff;  
  12.                 scrollbar-shadow-color: #c0c1bb;  
  13.                 scrollbar-3dlight-color: #c0c1bb;  
  14.                 scrollbar-arrow-color: #c9cbb6;  
  15.                 scrollbar-track-color: #f4f5f0;  
  16.                 scrollbar-darkshadow-color: #ffffff;  
  17.                 scrollbar-base-color: #ffffff;  
  18.                 padding: 17px;  
  19.                 word-wrap: break-word;  
  20.                 overflow: scroll;  
  21.                 overflow-x: auto;  
  22.                 height: 90%;  
  23.                 font-size: 12px;  
  24.                 background-color:white;  
  25.             }  
  26.               
  27.             body, td, textarea, input, br, div, span {  
  28.                 font-family: '宋体', Verdana, Arial, Helvetica, sans-serif;  
  29.                 line-height: 1.5;  
  30.             }  
  31.               
  32.             img {  
  33.                 border: 0;  
  34.             }  
  35.               
  36.             html {  
  37.                 height: 100%;  
  38.                 cursor: text;  
  39.             }  
  40.               
  41.             pre {  
  42.                 white-space: normal;  
  43.             }  
  44.               
  45.             form {  
  46.                 margin: 0;  
  47.             }  
  48.         </style> 
  49.           
  50.  
  51.     </head> 
  52.     <body  style="background-color:white;"> 
  53.     
  54.     <div id="xxx"></div> 
  55.     <span id="content" style="display:none"></span> 
  56.     </body> 
  57. </html> 
http://www.cnblogs.com/iamzhanglei/archive/2010/06/30/1768601.html

【责任编辑:张伟 TEL:(010)68476606】
精彩图集

赞助商链接