Fork me on GitHub
摘要: 代码如下:// 兼容所有浏览器function copyUrl(url) { if (navigator.userAgent.toLowerCase().indexOf('ie') > -1) { clipboardData.setData('Text', url); alert("该地址已复制到剪切板!"); } else { prompt("非IE内核浏览器,请复制以下地址:", url); }}html页面调用:<input type="button" value=" cli 阅读全文
posted @ 2011-08-16 18:51 磊哥|www.javacn.site 阅读(570) 评论(1) 推荐(0) 编辑
摘要: 主页index.html的主要代码如下:<button onclick="crossDomain();">开始跨域</button><div id="ajax"></div><iframe src="http://work.2fool.cn/crossdomain/iframe.html" id="iframe" style="display:none;"></iframe><script type="tex 阅读全文
posted @ 2011-08-16 14:56 磊哥|www.javacn.site 阅读(534) 评论(0) 推荐(0) 编辑