点击文字,复制URL,请速速回答,谢谢 js:window.clipboardData.setData("text","www.cctv.com"); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <body><table border = "1"> <tr> <td > <a id = "Url" href="http://www.cclinux.com">bbbb</a> <span onclick="GetUrlToclip('Url')" style="cursor:hand;">复制</span> </td> </tr> </table></body><script language="javascript">function GetUrlToclip(urlId){ window.clipboardData.setData("text",document.getElementById(urlId).href);}</script> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML> <HEAD> <TITLE> New Document </TITLE><script>function CopyTable(){document.getElementById("span1").innerHTML =document.getElementById("lianjie").value;var txt = document.body.createTextRange();txt.moveToElementText(oTable);txt.select();document.execCommand("copy","",null); // 复制document.getElementById("span1").innerHTML = "";alert('复制成功!');}</script> </HEAD> <BODY><a href="http://www.cctv.com" name = "lianjie" value = "http://www.cctv.com">CCTV</a><br /><INPUT TYPE="button" value="复制" onclick="CopyTable()"><TABLE id="oTable" border = "0"><span id="span1"> </span></TABLE> </BODY></HTML> jquery 动态添加标签 刚学javascript显示时间的代码一直弄不懂,麻烦帮忙看下 求一个js的表单判断,谁能试试,很怪的 怎么通过2个输入框来计算出第三个输入框的日期 非JavaScript高手不可:如何实现网页的分割条? 文本框中闪烁光标的屏幕坐标取法? js如何获取图片高度和宽度? 同志们,不能用javascript控制鼠标的位置?? JavaScript里有记录集的概念吗,怎么从数据库中取数据!!!!急!!!! 关于CHECKBOX的问题。 各位用过FCKeditor的大侠,如何用javascript获取编辑框内容啊?在线等.... JS控制COOKIE??
<table border = "1">
<tr>
<td >
<a id = "Url" href="http://www.cclinux.com">bbbb</a> <span onclick="GetUrlToclip('Url')" style="cursor:hand;">复制</span>
</td>
</tr>
</table>
</body>
<script language="javascript">
function GetUrlToclip(urlId)
{
window.clipboardData.setData("text",document.getElementById(urlId).href);
}
</script>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script>
function CopyTable()
{
document.getElementById("span1").innerHTML =document.getElementById("lianjie").value;
var txt = document.body.createTextRange();
txt.moveToElementText(oTable);
txt.select();
document.execCommand("copy","",null); // 复制
document.getElementById("span1").innerHTML = "";
alert('复制成功!');
}
</script>
</HEAD>
<BODY>
<a href="http://www.cctv.com" name = "lianjie" value = "http://www.cctv.com">CCTV</a>
<br />
<INPUT TYPE="button" value="复制" onclick="CopyTable()">
<TABLE id="oTable" border = "0"><span id="span1"> </span></TABLE>
</BODY>
</HTML>