欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

IE/火狐/Chrome操作display:none對象所遇問題解答

  發(fā)布時間:2013-03-28 14:32:42   作者:佚名   我要評論
display:none在IE、火狐、Chrome等主流瀏覽器中的一些問題想必大家也有碰到過吧,接下來為大家詳細圖文介紹下,感興趣的朋友可以參考下哈希望可以幫助到你

下面,先來段簡單的測試代碼

復制代碼
代碼如下:

[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>

[/code]
接著上三張在IE、火狐、Chrome瀏覽器調(diào)試工具顯示的源代碼中結(jié)果圖

******************************IE開發(fā)人員工具顯示的源代碼***************************************

******************************Firebug工具顯示的源代碼***************************************

******************************chrome開發(fā)人員工具顯示的源代碼***************************************

其上代碼執(zhí)行結(jié)果都是一樣的,如下圖:以后不要被悶到了!如果是開發(fā)工具顯示設置問題,或者編寫什么兼容代碼等,還望留言,感謝感謝!

相關文章

最新評論