在iframe如何实现记录下焦点光标的位置然后再恢复? 记录下iframe中光标的位置,在失去焦点后恢复 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 主要是处决于你iframe页面的焦点获取吧如a.htm<IFRAME HEIGHT=300 NAME=NONE WIDTH="300" FRAMEBORDER=0 STYLE="overflow:yes;z-index:1" SRC= "b.htm"; ></IFRAME > <input type=text><input type=text>b.htm<html><body onload=getfocus()><input type=text name=tt><script>function getfocus(){document.getElementById("tt").focus();}</script> </body></html>or <html><body onload=getfocus()><input type=text name=tt><script>function getfocus(){tt.focus();}</script> </body></html> 若是获取IFRAME内页面的textarea 焦点,则定制textarea的名字就行了,如<body onload=getfocus()><script>function getfocus(){tt.focus();}</script> <textarea name="tt" rows="9" cols="64"></textarea> IIS下activex控件没有提示没有反应。 请教firebug的两段代码错误原因 js按钮生成按钮,求解答 jquery 入门代码问题? 求破译一短代码 如果用frame打开任意网页,可以从frame得到网页的dom树,进而操作里面的页面吗? showModelessDialog如何刷新父窗体? 关于zTree一次性加载成千上万个子节点速度非常慢的问题 onchange在程序改变当前选项时无法触发? js数组进行处理的时候碰到的问题,很神奇 神那!救救我吧! 怎样隔一段时间或按刷新面页改变一个Flash动画?
如
a.htm
<IFRAME HEIGHT=300 NAME=NONE WIDTH="300" FRAMEBORDER=0 STYLE="overflow:yes;z-index:1" SRC= "b.htm"; ></IFRAME >
<input type=text><input type=text>b.htm
<html>
<body onload=getfocus()>
<input type=text name=tt>
<script>
function getfocus(){
document.getElementById("tt").focus();
}
</script>
</body>
</html>or <html>
<body onload=getfocus()>
<input type=text name=tt>
<script>
function getfocus(){
tt.focus();
}
</script>
</body>
</html>
<body onload=getfocus()>
<script>
function getfocus(){
tt.focus();
}
</script>
<textarea name="tt" rows="9" cols="64"></textarea>