点击TextBox复制其中内容
2006-11-24 16:29
459 查看
点击TextBox复制其中内容
<script>
function copyCode(o)
{
o.select();
var js=o.createTextRange();
var cp js.execCommand("Copy");
alert("图片地址已复制到剪贴板.");
}
function inplast(ob)
{
var obj=findObj(ob); if (obj) {
obj.select();js=obj.createTextRange();js.execCommand("Copy");}
}
</script>
<asp:TextBox ID="sex1" onclick="copyCode(this);" Runat="server" ></asp:TextBox>
<asp:TextBox id="sex2" onclick="inplast('From1');" Runat="server"></asp:TextBox>
附件:
一些常用的exeCommand
<textarea id=ta cols=24 rows=6>study by blueidea HOT.</textarea>
<button onclick=ta.focus();document.execCommand("selectall")>select</button>
<button onclick=document.execCommand("copy")>copy</button>
<button onclick=document.execCommand("cut")>cut</button>
<button onclick=ta.focus();document.execCommand("paste")>paste</button>
<button onclick=document.execCommand("open")>open</button>
<button onclick=document.execCommand("saveas")>saveas</button>
<input type=button value=刷新 name=refresh onclick="window.location.reload()">
<INPUT name=Submit onclick=history.go(1) type=submit value=前进>
<INPUT name=Submit2 onclick=history.go(-1) type=submit value=后退>
<INPUT name=Button onclick='window.location = "view-source:" + window.location.href' type=button value=查看源文件>
<script>
function copyCode(o)
{
o.select();
var js=o.createTextRange();
var cp js.execCommand("Copy");
alert("图片地址已复制到剪贴板.");
}
function inplast(ob)
{
var obj=findObj(ob); if (obj) {
obj.select();js=obj.createTextRange();js.execCommand("Copy");}
}
</script>
<asp:TextBox ID="sex1" onclick="copyCode(this);" Runat="server" ></asp:TextBox>
<asp:TextBox id="sex2" onclick="inplast('From1');" Runat="server"></asp:TextBox>
附件:
一些常用的exeCommand
<textarea id=ta cols=24 rows=6>study by blueidea HOT.</textarea>
<button onclick=ta.focus();document.execCommand("selectall")>select</button>
<button onclick=document.execCommand("copy")>copy</button>
<button onclick=document.execCommand("cut")>cut</button>
<button onclick=ta.focus();document.execCommand("paste")>paste</button>
<button onclick=document.execCommand("open")>open</button>
<button onclick=document.execCommand("saveas")>saveas</button>
<input type=button value=刷新 name=refresh onclick="window.location.reload()">
<INPUT name=Submit onclick=history.go(1) type=submit value=前进>
<INPUT name=Submit2 onclick=history.go(-1) type=submit value=后退>
<INPUT name=Button onclick='window.location = "view-source:" + window.location.href' type=button value=查看源文件>
相关文章推荐
- 如何点击TextBox 让其中的原内容清空?
- 点击按钮后实现复制,复制TextBox里面的内容
- JQuery点击复制文本框内容的方法插件
- 鼠标点击复制内容
- select下拉框点击其中一个内容,触发切换事件
- JS:点击文字将内容复制到粘贴板
- 兼容各浏览器的点击复制文本框内容的Jquery插件
- 点击复制按钮复制指定文本内容,实现网页中的复制功能
- bootstrap九宫格布局,点击其中一个DIV,弹框显示其内容
- ac_fl_runcontent 点击按钮复制内容
- js点击复制input内容
- C#textbox点击回车时内容消失
- jQuery插件Zclip实现完美兼容个浏览器点击复制内容到剪贴板
- 点击GridView中TextBox弹出输入对话层,输入内容反传回先前点击的TextBox中(Jquery获取GridView中TextBox的ID)
- JS点击复制按钮复制相关内容
- 点击复制内容到剪贴板
- // 点击 内容详情长按全选复制 返回 onClickMainDetailLongClickSelectAllCopyBack();
- JS 点击复制剪切板内容(IE9、Firefox4测试支持)
- JS 点击复制剪切板内容(IE8、IE9、Firefox4测试支持)
- Html点击复制文本内容