超链接(下划线、颜色)、javascript复制文本框内容

来源:互联网 发布:js 去掉input 光标 编辑:程序博客网 时间:2024/05/21 11:39
  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. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  5. <title>空间由中国最好的优质免费空间提供商 5944.net 友情提供! </title>
  6. <style type="text/css">
  7.     body{
  8.         font-size:12px;
  9.     }
  10.     a:visited{
  11.         text-decoration:none;
  12.         color:#000000;
  13.     }
  14.     a:link{
  15.         text-decoration:none;
  16.         color:#000000;
  17.     }
  18.     a:active{
  19.         text-decoration:none;
  20.         color:#000000;
  21.     }
  22.     a:hover{
  23.         text-decoration:none;
  24.         color:#000000;
  25.     }
  26. </style>
  27. </head>
  28. <body>
  29. <script type="text/javascript" src="http://index.5944.net/index1.htm"></script>
  30. <a href="http://www.5944.net" target="_blank">中国最好的优质免费空间提供商 5944.net 请主动挂上5944友情连接。谢谢! </a>
  31. <script language="javascript">
  32.     function CopyValue(input)
  33.     {
  34.         input.select();
  35.         window.clipboardData.setData('text', input.value);
  36.         alert('已经拷入剪贴板!');
  37.     }
  38.     function copyfun(i)
  39.     {
  40.         var bv=document.getElementById(i);
  41.         CopyValue(bv);
  42.     }
  43. </script>
  44. <table>
  45. <tr>
  46. <td>
  47.     <textarea name="text" cols="80" rows="2" id="text"><a href="http://www.5944.net" target="_blank">本站空间带宽由5944友情提供!</a></textarea>
  48.     <input type="button" name="Submit" value="复制" onclick="copyfun('text')" />
  49.     <br/>
  50. </td>
  51. </tr>
  52. <table>
  53. </body>
  54. </html>
原创粉丝点击