代码如下: function fromID(id) { return document.getElementById(id); } function show_alert(msg, type, time) { var layer_obj = fromID(“alert_layer”); var layer_text= fromID(“alert_text”); var line_height = (document.documentElement.scrollTop == 0) ? document.body.scrollTop : document.documentEleme