Jquery写的JS在IE8下正常在IE7下就报错???
/*弹出拍照*/
function topDialog(title, width, height, url, color, alpha)
{
var jqTopDialog_DivMaskLayer = getTopDialogDivMaskLayer(color, alpha);
$(window.top.document).find("body").append(jqTopDialog_DivMaskLayer);
var jqTopDialog_DivPanel = getTopDialogDivPanel(title, width, height, url);
$(window.top.document).find("body").append(jqTopDialog_DivPanel);
}
function topDialogClose()
{
$(window.top.document).find("body").find("#TopDialog_DivMaskLayer").remove();
$(window.top.document).find("body").find("#TopDialog_DivPanel").remove();
}
function getTopDialogDivMaskLayer(color, alpha)
{
var jqTopDialog_DivMaskLayer = $(document.createElement("div"));
jqTopDialog_DivMaskLayer.attr("id", "TopDialog_DivMaskLayer");
jqTopDialog_DivMaskLayer.css("position", "absolute");
jqTopDialog_DivMaskLayer.css("z-index", "100000");
jqTopDialog_DivMaskLayer.css("background-color", color);
jqTopDialog_DivMaskLayer.css("top", "0px");
jqTopDialog_DivMaskLayer.css("left", "0px");
jqTopDialog_DivMaskLayer.css("height", window.top.document.body.scrollHeight);
jqTopDialog_DivMaskLayer.css("width", "100%");
jqTopDialog_DivMaskLayer.css("display", "block");
jqTopDialog_DivMaskLayer.css("opacity", alpha);
return jqTopDialog_DivMaskLayer;
}
function getTopDialogDivPanel(title, width, height, url)
{
var jqTopDialog_DivPanel = $(document.createElement("div"));
jqTopDialog_DivPanel.attr("id", "TopDialog_DivPanel");
jqTopDialog_DivPanel.css("position", "absolute");
jqTopDialog_DivPanel.css("z-index", "100001");
jqTopDialog_DivPanel.css("background-color", "#ffffff");
jqTopDialog_DivPanel.css("top", window.top.document.body.scrollHeight / 2 - height / 2);
jqTopDialog_DivPanel.css("left", window.top.document.body.scrollWidth / 2 - width / 2);
jqTopDialog_DivPanel.css("height", height);
jqTopDialog_DivPanel.css("width", width);
jqTopDialog_DivPanel.css("display", "block");
var panelModel = getPanelModel(title, width, height, url);
jqTopDialog_DivPanel.append(panelModel);
return jqTopDialog_DivPanel;
}
function getPanelModel(title, width, height, url)
{
var line_left = $(document.createElement("div"));
line_left.css("background", "url(/Images/topDialog/line_left.gif) no-repeat left top");
line_left.css("width", "100%");
var line_right = $(document.createElement("div"));
line_right.css("background", "url(/Images/topDialog/line_right.gif) no-repeat ri