Supposing you're using plain JS (see other answers for jQuery), to change an element's opacity, write:
var element = document.getElementById('id');
element.style.opacity = "0.9";
element.style.filter = 'alpha(opacity=90)'; // IE fallback
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…