function resetIframeHeight(frmname){ //frmname是一个iframe的idtry{ var str=window.clipboardData.getData('text'); var obj=document.getElementById(frmname); if(str.match(/^frameHeight=\d+$/)){ obj.style.height=parseInt(str.match(/\d+/))+'px';
window.clipboardData.setData('text','null'); }}catch(e){}setTimeout(resetIframeHeight,100); }
function setHeight()
{window.clipboardData.setData('text',String('frameHeight='+window.document.body.scrollHeight)); //剪切板操作}
window.onload=setHeight;谁能把这段代码转换成各浏览器都兼容的js感谢之至
等待
……
有这样的工具转换也可以了
window.clipboardData.setData('text','null'); }}catch(e){}setTimeout(resetIframeHeight,100); }
function setHeight()
{window.clipboardData.setData('text',String('frameHeight='+window.document.body.scrollHeight)); //剪切板操作}
window.onload=setHeight;谁能把这段代码转换成各浏览器都兼容的js感谢之至
等待
……
有这样的工具转换也可以了
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货