两上小问题,一个是关于“复制、粘贴”,一个是关于“加入到收藏夹”的,请指教了,立即解贴。 2、打开一页面后,点击一按钮,将当前网页加入到IE的收藏夹里。<input type="button" name="as" onclick="book()">function book(){window.external.AddFavorite(location.href, document.title)} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 1.<input type="text" id="ice"/><input type="button" value="Copy" onclick="clipboardData.setData('Text',document.getElementById('ice').value)"/><input type="button" value="show" onclick="alert(clipboardData.getData('text'))"/> 1.<input type="text" id="ice"/><input type="button" value="Copy" onclick="clipboardData.setData('Text',document.getElementById('ice').value)"/><input type="button" value="show" onclick="alert(clipboardData.getData('text'))"/> 一个文本框时有内容,点击一按钮,将文本框的内容复制到剪贴板上<form name="test"><a class="highlighttext" href="javascript:HighlightAll('test.select1')">Select All</a><br><textarea name="select1" rows=10 cols=35 >This is some text. This is some text. This is some text. This is some text.</textarea></form><style>.highlighttext{background-color:yellow;font-weight:bold;}</style><script language="Javascript"><!--/*Highlight and Copy form element script- By Dynamicdrive.comFor full source, Terms of service, and 100s DTHML scriptsVisit http://www.dynamicdrive.com*///specify whether contents should be auto copied to clipboard (memory)//Applies only to IE 4+//0=no, 1=yesvar copytoclip=1function HighlightAll(theField) {var tempval=eval("document."+theField)tempval.focus()tempval.select()if (document.all&©toclip==1){therange=tempval.createTextRange()therange.execCommand("Copy")window.status="Contents highlighted and copied to clipboard!"setTimeout("window.status=''",1800)}}//--></script> Jquery表单美化插件! 使用js每隔一段时间扫描让iframe自动适应高度会影响网速么 JS函数不能调用,怎么回事? 关于用JS传FORM的值问题? 请教一个关于iframe的问题 怎么写javascript关闭窗口, 使用firefox 怎样判断一个页面是在模态窗口里还是在正常窗口里? 请问大侠“关闭窗口”无提示关闭? iframe的提交问题 用IE浏览时能否改变正在运行的脚本变量值? dropdown问题 如何在进入页面的时候就对页面进行一次刷新??
<input type="text" id="ice"/>
<input type="button" value="Copy" onclick="clipboardData.setData('Text',document.getElementById('ice').value)"/>
<input type="button" value="show" onclick="alert(clipboardData.getData('text'))"/>
<input type="text" id="ice"/>
<input type="button" value="Copy" onclick="clipboardData.setData('Text',document.getElementById('ice').value)"/>
<input type="button" value="show" onclick="alert(clipboardData.getData('text'))"/>
<a class="highlighttext" href="javascript:HighlightAll('test.select1')">Select All</a><br>
<textarea name="select1" rows=10 cols=35 >This is some text. This is some text. This is some text. This is some text.</textarea>
</form><style>
.highlighttext{
background-color:yellow;
font-weight:bold;
}
</style><script language="Javascript">
<!--/*
Highlight and Copy form element script- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*///specify whether contents should be auto copied to clipboard (memory)
//Applies only to IE 4+
//0=no, 1=yes
var copytoclip=1function HighlightAll(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
if (document.all&©toclip==1){
therange=tempval.createTextRange()
therange.execCommand("Copy")
window.status="Contents highlighted and copied to clipboard!"
setTimeout("window.status=''",1800)
}
}
//-->
</script>