网页常用的运行框代码,只要拿文章里面的关键字来替换就行了,基本兼容所有浏览器,实用js运行框代码。
<SCRIPT> function run_wuming(obj) {//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) var TestWin=open(''); TestWin.document.write(obj.value); } function runcode_copy(element) { var codeobj = document.getElementById(element); var meintext = codeobj.value; try { if (window.clipboardData) { // the IE-manier window.clipboardData.setData("Text", meintext); // waarschijnlijk niet de beste manier om Moz/NS te detecteren; // het is mij echter onbekend vanaf welke versie dit precies werkt: } else if (window.netscape) { // dit is belangrijk maar staat nergens duidelijk vermeld: // you have to sign the code to enable this, or see notes below netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); // maak een interface naar het clipboard var clip = Components.classes['@mozilla.org/widget/clipboard;1'] .createInstance(Components.interfaces.nsIClipboard); if (!clip) return; // maak een transferable var trans = Components.classes['@mozilla.org/widget/transferable;1'] .createInstance(Components.interfaces.nsITransferable); if (!trans) return; // specificeer wat voor soort data we op willen halen; text in dit geval trans.addDataFlavor('text/unicode'); // om de data uit de transferable te halen hebben we 2 nieuwe objecten // nodig om het in op te slaan var str = new Object(); var len = new Object(); var str = Components.classes["@mozilla.org/supports-string;1"] .createInstance(Components.interfaces.nsISupportsString); var copytext=meintext; str.data=copytext; trans.setTransferData("text/unicode",str,copytext.length*2); var clipid=Components.interfaces.nsIClipboard; if (!clip) return false; //武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) clip.setData(trans,null,clipid.kGlobalClipboard); //武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) } } catch (e) {alert('武鸣人提示您因为安全策略的原因,此项功能已被您的浏览器禁止。关闭此窗口,然后按下“Ctrl+C”组合键完成复制。');codeobj.focus(); } codeobj.select(); return false; } function myurl(){ var url; var mytitle; url=document.location; mytitle = document.title;//标题 if(mytitle == null){ var t_titles = document.getElementByTagName("title") if(t_titles && t_titles.length >0) { mytitle = t_titles[0]; }else{ kdocTitle = ""; } } websiteinfo=mytitle+' '+url; document.getElementById("_www_wuming_ren").value = websiteinfo; } function copy_clip(copy){ if (window.clipboardData){ window.clipboardData.setData("Text", copy);} else if (window.netscape){ //sky于2009年12月31号修改。 try{ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); } catch (e) { alert("您已经取消操作!\n或者此操作被浏览器拒绝!解决方法如下:\n在浏览器地址栏输入“about:config”后回车\n将signed.applets.codebase_principal_support的值设置为'true',双击改变。"); } var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard); if (!clip) return; var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable); if (!trans) return; trans.addDataFlavor('text/unicode'); var str = new Object(); var len = new Object(); var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); var copytext=copy; str.data=copytext; trans.setTransferData("text/unicode",str,copytext.length*2); var clipid=Components.interfaces.nsIClipboard; if (!clip) return false; clip.setData(trans,null,clipid.kGlobalClipboard);} alert("复制成功:"+copy) return false; } </SCRIPT> <a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> 运行代码功能js脚本,可输入任意字符后再运行看效果。<br /> <textarea style="width:365px; height:200px;" class="runcode_text" id="www_wuming_ren">武鸣人信息资源平台,各种信息免费发布!</textarea><br /><input type="button" value="运行代码" onclick="run_wuming(www_wuming_ren)" /><input type="button" value="复制代码" onclick="runcode_copy('www_wuming_ren');" /><input type="hidden" id="_www_wuming_ren" value="" /><input type="button" value="推荐给好友" onclick="myurl();copy_clip(document.getElementById('_www_wuming_ren').value)" />
本文来自武鸣人网站,转载请注明出处