本文所分享的知识点是【IE/火狐/Chrome操作display:none对象所遇问题解答】,欢迎您喜欢我爱IT技术网所分享的教程、知识、经验或攻略,下面是详细的讲解。
IE/火狐/Chrome操作display:none对象所遇问题解答
[code]
<SPAN style="FONT-SIZE: 14px"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>不要被闷了</title>
<body>
<input type="text" id="hh1" value="2">
<input type="hidden" id="hh2" value="2">
<input type="text" style="display:none" id="hh3" value="2">
<div style="display:none"><input type="text" id="hh4" value="2"></div>
<script>
document.getElementById("hh1").value="11111";
document.getElementById("hh2").value="11111";
document.getElementById("hh3").value="11111";
document.getElementById("hh4").value="11111";
var strall="h1="+document.getElementById("hh1").value;
strall+=",h2="+document.getElementById("hh2").value;
strall+=",h3="+document.getElementById("hh3").value;
strall+=",h4="+document.getElementById("hh4").value;
alert(strall);
</script>
</body>
</html></SPAN>
关于IE/火狐/Chrome操作display:none对象所遇问题解答的相关讨论如下:
相关问题:Element.style.display="none";火狐不支持
答:您好!很高兴为您答疑! 火狐是支持的,估计是element获取有问题,没获取到正确的对象,建议使用通用的document.getElementById("")。 您可以在火狐社区了解更多内容。希望我的回答对您有所帮助,如有疑问,欢迎继续在本平台咨询。 >>详细
相关问题:CSS属性display在火狐浏览器下面的问题,求助大神,...
答:我信息给你写了一个·· 兼容所有浏览器 页签 body { margin:0; padding:0; font-size:12px; font-family:Verdana, Geneva, sans-serif;} .tab_all { width:800px; height:auto; margin:0 auto; margin-top:50px;} .tab_menu { width:800px; heigh... >>详细
相关问题:鼠标勾选后显示输入框的在火狐下的问题
答:vbscript只有IE浏览器才支持,firefox,chrome的非IE内核的浏览器是不支持的,这是网页,最好用javascript写 >>详细
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
