我有一個觀點的隱私政策。我爲我的div添加了不透明度,但現在我不知道如何去除不透明度。我嘗試刪除屬性,但它不工作。有人可以幫助我嗎?這是一個非常緊迫的要求。如何刪除JavaScript中的透明度?
<script type="text/javascript">
function show(id)
{
if(document.getElementById("wrapper")) //check the element exists and can be accessed
{
var ele = document.getElementById("wrapper");//get hold of the element
if(ele.style.visibility=="visible")//see if display property is set to none
{
}
else
{
ele.style.visibility="visible";
document.getElementById('LOGIN').style.opacity = 0.4;
}
}
}
function hide(id)
{
if(document.getElementById("wrapper"))//check the element exists and can be accessed
{
var ele = document.getElementById("wrapper");//get hold of the element
if(ele.style.visibility=="visible")//see if display property is set to none
{
ele.style.visibility="hidden";
}
else
{
}
}
}
</script>
<style>
#wrapper {
position:absolute;
z-index:1;
top:11%; bottom:5%; left:4%;right:15%;
width:87%;
height:75%;
font-size:15pt;
border:5px solid orange;
border-radius:25px;
overflow:auto;
visibility:hidden;
background-color:#ffffff;
}
#LOGIN.faded {
opacity: 0.5;
}
</style>
</head>
<body >
<div id="LOGIN" align="center">
<table width="100%">
<tr>
<td>
<input type="image" src="../images/header-sign-up.png" style="width:100%" alt=""/>
</td>
</tr>
</table>
<div align="center">
<a href="#" onclick ="show('showhide');">View privacy policy</a>
</div>
</div>
<div id="wrapper">
<div id="scroller" >
<div id="popupContact" >
<a href="#" onclick ="hide('showhide');">Close Window</a><br/>
<p>
biler Privacy Policy
Please feel free to contact us with any comments, questions, complaints or suggestions you might have regarding the information practices described in this statement. You may send us an e-mail at
</p>
</div>
</div>
</div>
</body>
</html>
反過來不透明度值至1.0?另請參見http://www.quirksmode.org/js/opacity.html使它在IE – DhruvPathak