代码如下: //实现局部遮罩 [removed] function Shade(){ var s = document.getElementById(“shade”); s.style.display = “block”; } function Display(){ var d = document.getElementById(“shade”); d.style.display = “none”; } [removed] <style type=”text/css”> #box{ width:400px; height:300px; positio