关于Iframe的onfocus,IE5~8
来源:互联网 发布:国内网络虚拟货币 编辑:程序博客网 时间:2024/06/07 05:24
<div>
<input id="mytext" type="text" size="10" value="Hello!" onfocus="setbgColor('yellow')"
onblur="setbgColor('white')" />
<script type="text/javascript">
function setbgColor(c) {
document.getElementById("mytext").style.backgroundColor = c;
}
function big() {
//alert("onfocus");
document.getElementById("MyFrame").style.width = "200px";
//..................................................document.getElementById("MyFrame").blur();
}
function small() {
//alert("onblur");
document.getElementById("MyFrame").style.width = "150px";
}
function fun1() {
//document.getElementById("mytext").focus();
document.getElementById("MyFrame").blur();
//document.getElementById("MyFrame").focus();
}
function fun2() {
//document.getElementById("mytext").focus();
//document.getElementById("MyFrame").blur();
document.getElementById("MyFrame").focus();
}
</script>
<iframe id="MyFrame" src="WebForm2.aspx" width="150px" frameborder="1" height="150px"
style="border: 1px solid black; position: absolute; top: 150px; left: 150px;"
onfocus="big()" onblur="small()"></iframe>
<input style="width:100px; height:30px;" value="fun1" type="button" onclick="fun1()" />
<input style="width:100px; height:30px;" value="fun2" type="button" onclick="fun2()" />
</div>
<input id="mytext" type="text" size="10" value="Hello!" onfocus="setbgColor('yellow')"
onblur="setbgColor('white')" />
<script type="text/javascript">
function setbgColor(c) {
document.getElementById("mytext").style.backgroundColor = c;
}
function big() {
//alert("onfocus");
document.getElementById("MyFrame").style.width = "200px";
//..................................................document.getElementById("MyFrame").blur();
}
function small() {
//alert("onblur");
document.getElementById("MyFrame").style.width = "150px";
}
function fun1() {
//document.getElementById("mytext").focus();
document.getElementById("MyFrame").blur();
//document.getElementById("MyFrame").focus();
}
function fun2() {
//document.getElementById("mytext").focus();
//document.getElementById("MyFrame").blur();
document.getElementById("MyFrame").focus();
}
</script>
<iframe id="MyFrame" src="WebForm2.aspx" width="150px" frameborder="1" height="150px"
style="border: 1px solid black; position: absolute; top: 150px; left: 150px;"
onfocus="big()" onblur="small()"></iframe>
<input style="width:100px; height:30px;" value="fun1" type="button" onclick="fun1()" />
<input style="width:100px; height:30px;" value="fun2" type="button" onclick="fun2()" />
</div>
- 关于Iframe的onfocus,IE5~8
- iframe的onfocus在firefox中失效?
- 关于使用onfocus=”this.blur()”的利与弊
- css兼容性ie5/6/7/8的圆角
- 关于iframe的替换
- 关于iframe的使用
- CSS的解决IE5/IE5.5/IE6/FF的兼容性问题
- 【转】 解决IE5/IE5.5/IE6/FF的兼容性问题
- 解决IE5/IE5.5/IE6/FF的兼容性问题
- 启用ie5的java控制台
- iframe自动调整高度能在IE5里实现吗
- OnFocus与OnBlur的例子
- onFocus 和 onClick 的区别
- js的onblur和onfocus
- onclick和onfocus的区别
- onblur和onfocus的区别
- 关于IFrame的一个盲点
- 关于IFRAME的onload事件
- Vim的行号、语法显示等设置,即.vimrc文件的配置
- Puppy Linux U盘安装使用
- 嵌入式关系型数据库SQLite
- 信息管理系统开发利器-配置实现
- 栈---链表实现
- 关于Iframe的onfocus,IE5~8
- 一款不错的visual studio 2010深色主题下载
- centos 安装MySQL全过程
- Android Initialization Process
- POJ - 2478 欧拉函数..
- Oracle B-tree、位图、全文索引三大索引性能比较及优缺点汇总(引用)
- 将Linux内核启动信息能过串口输出
- Android全屏和强制横屏竖屏设置
- malloc动态分配内存,超字节赋值没有出错