当前位置: 代码迷 >> JavaScript >> 这个js,ie6提示IE无法打开站点,已终止,ie7、8没事,哪位高人帮忙看下?跪拜中.解决方法
  详细解决方案

这个js,ie6提示IE无法打开站点,已终止,ie7、8没事,哪位高人帮忙看下?跪拜中.解决方法

热度:186   发布时间:2012-03-29 12:53:12.0
这个js,ie6提示IE无法打开站点,已终止,ie7、8没事,哪位高人帮忙看下?跪拜中...
function $($) {
  return document.getElementById($)
}
function $c(B, _, C, $) {
  var A = document.createElement(B);
  if (_) A.id = _;
  if (C) A.innerHTML = C;
  if ($) $.appendChild(A);
  return A
}
function $s(A, _) {
  $(A).style.display = _ ? "": "none"
}
function hit(_) {
  $(_).style.display = $(_).style.display == "block" ? "none": "block"
}
String.prototype.lenB = function() {
  return this.replace(/[^\x00-\xff]/g, "**").length
};
function gethtmlbody() {
  var $ = document.body.clientHeight,
  _ = document.documentElement.clientHeight,
  A = (_ <= $ && _ != 0) ? true: false;
  return A ? document.documentElement: document.body
}
function addEvent(A, $, _) {
  if (A.addEventListener) A.addEventListener($, _, true);
  else A.attachEvent("on" + $, _)
}
function getScreenSize() {
  var $ = 0,
  _ = 0;
  if (self.innerHeight) {
  $ = self.innerWidth;
  _ = self.innerHeight
  } else if (document.documentElement && document.documentElement.clientHeight) {
  $ = document.documentElement.clientWidth;
  _ = document.documentElement.clientHeight
  } else if (document.body) {
  $ = document.body.clientWidth;
  _ = document.body.clientHeight
  }
  return {
  w: $,
  h: _
  }
}
function ajaxProxy() {
  if (($("ajaxProxy") && $("ajaxProxy").contentWindow.pAjax)) return $("ajaxProxy").contentWindow.pAjax;
  return false
}
function jsLoader(C, B) {
  var _ = document.getElementsByTagName("head")[0],
  A = document.createElement("script");
  A.setAttribute("charset", "gb2312");
  A.setAttribute("type", "text/javascript");
  A.setAttribute("src", C);
  var $ = function(_) {
  var $ = (_ ? _: window.event).target ? (_ ? _: window.event).target: (_ ? _: window.event).srcElement;
  if ($ && ($.readyState == "loaded" || $.readyState == "complete")) {
  $.onreadystatechange = null;
  B()
  }
  };
  if (B) if (document.all) A.onreadystatechange = $;
  else A.onload = B;
  _.appendChild(A)
}
function setalpha(C, B, _, $) {
  if (!B) B = 10;
  if (!_) _ = 5;
  if (!$) $ = 10;
  if (navigator.userAgent.indexOf("MSIE") > 0) {
  C.style.filter = "alpha(opacity:100)";
  C.filters.alpha.opacity = B;
  var A = setInterval(function() {
  C.filters.alpha.opacity += _;
  if (C.filters.alpha.opacity >= 100) clearInterval(A)
  },
  $)
  }
}
function addfavorite(_, $) {
  _ = _ || document.title;
  $ = $ || document.location.href;
  if (document.all) window.external.addFavorite($, _);
  else if (window.sidebar) window.sidebar.addPanel(_, $, "")
}
function addcss(A) {
  try {
  var _ = document.createStyleSheet();
  _.cssText = A
  } catch($) {
  _ = document.createElement("style");
  _.type = "text/css";
  _.textContent = A;
  相关解决方案