"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=//g", "").replace("//g", ""), n = n.replace("//g", "").replace("//g", "").replace("http://", "").replace("https://", ""), r = r.replace("//g", "").replace("//g", ""), i = i.replace("//g", "").replace("//g", "").replace("http://", "").replace("https://", ""); var o = "/Tools/Message.aspx?result=" + t + "&btntitle=" + encodeURIComponent(r) + "&btnhref=" + encodeURIComponent(n) + "&defaulthref=" + encodeURIComponent(i) + "&delay=" + s + "&msg=" + encodeURIComponent(e); location.href = o } function hideMsg() { showDdl(); var e = $j("mesbook1"); hideFullBg(), e.fadeOut(80) } function setCM(e, t) { var n; typeof e.toString().toLowerCase() == "string" ? n = $j(e) : n = $(e), t == null && (t = 80); var r = n.height() / 2, i = n.width() / 2; n.css({ top: "50%", "margin-top": "-" + r + "px", left: "50%", "margin-left": "-" + i + "px" }), n.css({ position: "absolute", "z-index": "999" }), n.fadeIn(t) } function setCMS(e, t) { var n; typeof e.toString().toLowerCase() == "string" ? n = $j(e) : n = $(e), t == null && (t = 80); var r = n.height() / 2, i = n.width() / 2, s = document.documentElement.scrollTop; s > 100 ? n.css({ top: "50%", "margin-top": "-" + r + "px", left: "50%", "margin-left": "-" + i + "px" }) : (r = 200, n.css({ "margin-top": "-" + r + "px", left: "50%", "margin-left": "-" + i + "px" })), n.css({ position: "absolute", "z-index": "999" }), n.fadeIn(t) } function showFullBg(e, t, n, r, i, s, o) { e == null && (e = "oran_full_bg"); var u = $j(e); if (u.length == 0) { var a = ""; $(document.body).append(a) } n == null && (n = .75), r == null && (r = "#777"), i == null && (i = "9"), s == null && (s = 80), t == null && (t = !0); var u = $j(e), f = document.documentElement, l = f.scrollWidth, c = f.scrollHeight, h = f.clientHeight, p = f.clientWidth; c < h && (c = h), l < p && (l = p), u.css({ "z-index": i, background: r, opacity: n, filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=" + n * 100 + ")" }), u.css({ height: c, width: l }), t && hideDdl(null, o), u.fadeIn(s), o != null && o() } function hideFullBg(e, t) { e == null && (e = "oran_full_bg"), t == null && (t = 80); var n = $j(e); n.fadeOut(t), showDdl() } function $closeLayer(e, t) { $j(e).fadeOut(80, function () { hideFullBg(t) }) } function limitLength(e) { var t = e.value, n = parseInt($(e).attr("max")), r = e.id, i = t.replace(/[^-ÿ]/g, "**"), s = i.length; if (s * 1 <= n * 1) return; var o = i.substr(0, n), u = 0, a = ""; for (var f = 0; f < o.length; f++) { var l = o.substr(f, 1); l == "*" && u++ } var c = 0, h = i.substr(n * 1 - 1, 1); u % 2 == 0 ? (c = u / 2 + (n * 1 - u), a = t.substr(0, c)) : (c = (u - 1) / 2 + (n * 1 - u), a = t.substr(0, c)), alert("最大输入" + n + "个字节(相当于" + n / 2 + "个汉字)!"), document.getElementById(r).value = a; return } function $g(e) { return document.getElementById(e) } function $name(e) { return document.getElementsByName(e) } function $tag(e, t) { var n = e; return n != Object && (n = $g(e)), n.getElementsByTagName(t) } function digiKeyOnly(e) { var t = window.event ? event.keyCode : e.which; return t < 27 || t > 128 ? !0 : t >= 48 && t <= 57 ? !0 : !1 } function digiOnly(e) { e.value = e.value.replace(/[^0-9]/g, "") } function $o(e, t, n, r) { if (e == null || e == "") return; t == null && (t = "300"), n == null && (n = "300"), r == null && (r = "location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0;top=0,left=0"), t && (r += ",width=" + t), n && (r += ",height=" + n), window.open(e, "", r, !1) } function emptyText(e) { var t; e == null ? t = $("body").find("input[type=text]") : t = $j(e).find("input[type=text]"); var n; e == null ? n = $("body").find("input[type=password]") : n = $j(e).find("input[type=password]"), t.each(function () { $(this).attr("value", "") }), n.each(function () { $(this).attr("value", "") }), e == null ? t = $("body").find("textarea") : t = $j(e).find("textarea"), t.each(function () { $(this).attr("value", "") }) } function $qs(e) { var t = new Object, n = location.search.substring(1), r = n.split("&"); for (var i = 0; i < r.length; ++i) { var s = r[i].indexOf("="); if (!s) continue; var o = r[i].substring(0, s), u = r[i].substring(s + 1); u = decodeURIComponent(u), t[o] = u } return t[e] == null ? "" : t[e] } function selectAll(e, t) { var n = $tag(t, "input"); for (var r = 0; r < n.length; ++r) n[r].checked = e.checked } function invertSelect(e) { var t = $tag(e, "input"); for (var n = 0; n < t.length; ++n) t[n].checked = !t[n].checked } function getPageFilename() { var e = location.pathname, t = e.lastIndexOf("/") + 1, n = e.substring(t, e.length); return n } function getRawUrl() { var e = location.href, t = e.lastIndexOf("/") + 1, n = e.substring(t, e.length); return t = n.lastIndexOf("#"), n = n.substring(0, t), n } function getIntactRawUrl() { var e = location.href, t; return t = e.lastIndexOf("#"), e = e.substring(0, t), e } function toggleArg(e, t) { var n = $$.intactRawUrl(), r = n.indexOf("?"); if (r == -1) return n + "?" + e + "=" + t; var i = n.substring(r), s = n.substring(0, r), o = new RegExp("&?" + e + "=?\\w*\\[?\\w*\\]?\\|?\\d?", "i"); return i = i.replace(o, ""), i.length == 1 ? i += e + "=" + t : i += "&" + e + "=" + t, s + i } function increase(e, t) { t == null && (t = "show"); var n = $j(e); n.animate({ height: t, width: t, opacity: t }, "fast") } function fadeToggle(e, t) { t == null && (t = "fast"), $("#" + e).is(":visible") ? $("#" + e).fadeOut(t) : $("#" + e).fadeIn(t) } function clearAllElms(e, t) { clearDdls(e, t), clearTextBoxes(e, t), clearRdos(e, t), clearChks(e, t) } function clearRdos(e, t) { t == null && (t = "tfocus"); var n = $j(e).find("input[type=radio]"); n.focus(function () { $(this).addClass(t) }), n.blur(function () { $(this).removeClass(t) }) } function clearChks(e, t) { t == null && (t = "tfocus"); var n = $j(e).find("input[type=checkbox]"); n.focus(function () { $(this).addClass(t) }), n.blur(function () { $(this).removeClass(t) }) } function clearDdls(e, t) { t == null && (t = "tfocus"); var n = $j(e).find("select"); n.focus(function () { $(this).addClass(t) }), n.blur(function () { $(this).removeClass(t) }) } function clearTextBoxes(e, t) { t == null && (t = "tfocus"); var n = $j(e).find("input[type=text]"); n.focus(function () { $(this).addClass(t) }), n.blur(function () { $(this).removeClass(t) }); var n = $j(e).find("input[type=password]"); n.focus(function () { $(this).addClass(t) }), n.blur(function () { $(this).removeClass(t) }), n = $j(e).find("textarea"), n.focus(function () { $(this).addClass(t) }), n.blur(function () { $(this).removeClass(t) }) } function addBookmark(e, t) { if (window.sidebar) try { window.sidebar.addPanel(_title, e, "") } catch (n) { alert("加入收藏失败,请使用Ctrl+D进行添加") } else if (document.all) window.external.AddFavorite(e, t); else if (window.opera && window.print) return !0 } function addBookmark() { var e = document.title, t = document.URL; try { var n = navigator.userAgent.toLowerCase(); if (window.sidebar) { if (n.indexOf("firefox") > -1 && n.match(/firefox\/([\d.]+)/)[1] == "23.0") return _this.setAttribute("title", e), !0; window.sidebar.addPanel(t, e) } else document.all && window.external ? window.external.AddFavorite(t, e) : alert("浏览器不支持该操作,尝试快捷键 Ctrl + D !") } catch (r) { alert("浏览器不支持该操作,尝试快捷键 Ctrl + D !") } return !1 } function BookMarkit() { var e = "http://" + window.location.host, t = document.title; document.all ? window.external.addFavorite(e, t) : window.sidebar && window.sidebar.addPanel(t, e, "") } function setSelectByValue(e, t) { var n = $g(e); for (var r = 0; r < n.options.length; ++r) { var i = n.options[r]; i.selected = i.value == t } } function showVerifyCode(e, t, n, r) { e == null && (e = "spVerCode"), t == null && (t = "spVerCodeMsg"), n == null && (n = "imgVerCode"), r == null && (r = "spChgVerCode"); var i = $j(e), s = $j(t), o = $j(r); i.html() == "" && (s.html("正在加载验证码..."), s.show(), i.html("")); var u = $j(n); u.load(function () { s.hide(), u.show(), o.show() }) } function changeVerCode(e, t) { e == null && (e = "imgVerCode"), t == null && (t = "spVerCodeMsg"); var n = $j(e), r = $j(t); r.html("正在刷新验证码...").show(), n.attr({ src: "/Tools/ValidCode.aspx?x=" + Math.random(), alt: "验证码" }), n.hide(), n.load(function () { r.hide(), n.show() }) } function showProc(e, t) { var n = $j("imgProc"); t == null && (t = !0), t ? ($(e).hide(), n.length > 0 && n.remove(), $("").insertAfter(e)) : ($(e).show(), n.remove()) } function enlarge(e, t) { e == null && (e = !0), t == null && (t = "Content"); var n = $j(t), r = parseInt(n.css("font-size")), i = e ? r * 1.2 : r / 1.2; n.css("font-size", i + "px") } function altRow(e, t, n, r) { var i = $tag(t, "tr"); for (var s = e; s < i.length; ++s) { var o; s % 2 == 0 ? o = r : o = n; if (typeof o == "object") for (var u in o) i[s].style[u] = o[u]; else i[s].className = o } } function getCheckedVal(e, t) { t == null && (t = -1); var n = $j(e).find("input:checked"), r = "", i = !1; return n.each(function (e) { e > t && (i && (r += ","), r += $(this).val(), i = !0) }), r } function checkAll(e, t) { var n = $j(t).find("input[type=checkbox]"); n.each(function (t) { this.checked = e.checked }) } function GetSearchURL(e, t) { t == null && (t = getIntactRawUrl()); var n = e.split("|"); for (var r = 0; r < n.length; r++) { var i = n[r].split(","), s, o = document.getElementById(i[0]); i.length == 2 ? s = i[1] : s = i[0]; if (o != null) { var u = o.value; u == "请输入关键词搜索" && (u = ""), u != null && (t += "&" + s + "=" + encodeURIComponent(u)) } } return t } function SearchObjectByGet(e, t, n) { n == null && (n = !1); var r = GetSearchURL(e, t); if (n) return r; window.location.href = r } function SearchObjects(e, t) { if (e == "请填写关键词" || e == "请输入关键词") { $a("您还没有输入关键词,请填写后查询。"); return } if (t == "product") { var n = "/Search/Index.aspx?objtype=product&kwd=" + escape(e); window.location.href = n } else { var n = "/Search/News.aspx?objtype=news&kwd=" + escape(e); window.location.href = n } } function GoToURL(e, t) { var n; n = SetURLField(n, e, t), location.href = n } function GoToURLByGet(e, t) { var n; n = location.href, n = SetURLField(n, "page", "1"), n = SetURLField(n, e, t) } function SetURLField(e, t, n) { var r; r = e.indexOf("?"); if (r == -1) e += "?" + t + "=" + n; else { var i = t + "=", s = e.indexOf(i); s != -1 ? (s += i.length, end = e.indexOf("&", s), end == -1 ? e = e.substring(0, s) + n : e = e.substring(0, s) + n + e.substring(end)) : e = e + "&" + t + "=" + n } return e } function readURLParameter(e) { var t = e + "=", n = "", r = location.href, i = r.indexOf(t); return i != -1 && (i += t.length, end = r.indexOf("&", i), end == -1 ? n = r.substring(i) : n = r.substring(i, end)), n } function focusToRemoveText(e) { var t = $(e), n = t.attr("hadfocused") == "1"; n || (t.val(""), t.attr("hadfocused", "1")) } function SUR_ShowTable(e) { var t = "", n; switch (e.SelectionMode) { case 1: n = "radio"; break; case 2: n = "checkbox" } switch (e.ShowMode) { case 1: t = '
' + '
' + e.Title + "
" + '
'; for (var r = 0; r < e.Items.length; ++r) { var i = e.Items[r], s = "SUR_item_" + e.SubjectId + r; t += '
' + '
" + "
" } t += '
' + '' + "
" + "
" } document.write(t) } function SUR_senddata(e, t) { var n = "SUR_post_msg_" + t.SubjectId, r = "正在提交,请稍后...", i = "/ajax.ashx?action=Survey&t=" + Math.random(), s = getCheckedVal("SUR_itemTab_" + t.SubjectId); if (s == null || s.length == 0) { $a("您至少需要选中一个投票项。"); return } $(e).after(r).hide(), $.post(i, { _SUR_SubjectID: t.SubjectId, _CheckedItems: s }, function (r) { var i = gav(r, "state"), s = gav(r, "msg"); i == "1" ? $confirm("投票成功,感谢您的参与。", { title: "确定", toDo: function () { hideConfirm() } }, { title: "查看结果", toDo: function () { window.open("/tools/survey.aspx?oid=" + t.SubjectId), hideConfirm() } }) : $a(s), $j(n).remove(), $(e).show() }) } function LEW_ShowTable() { var e = '
留言
* 标题:
* 联系人:
联系电话:
手机号码:
* 电子邮箱地址:
* 留言分类:
留言内容:
'; document.write(e), fillLeavewordCategories() } function PAY_ShowTable() { var e = '
付款
' + "
" + "
" + "
* 付款方式:
" + '
" + "
" + "
" + "
* 付款人:
" + '
' + "" + "
" + "
* 电子邮箱地址:
" + '
' + "
" + "
" + "
联系电话:
" + '
' + "
" + "
" + "
手机号码:
" + '
' + "
" + "
" + "
我公司业务员姓名:
" + '
' + "
" + "
" + "
* 付款金额:
" + '
' + "
" + "
" + "
* 款项用途:
" + '
' + "
" + "
" + "
" + "
" + ' ' + "
" + "
" + "
" + "
"; document.write(e) } function LoginCheck(e, t) { var n = window.location; if (e == undefined || e.length == 0) { $a("请输入用户名", "错误提示", "txtUsername"); return } if (t == undefined || t.length == 0) { $a("请输入密码", "错误提示", "txtPassword"); return } $.post("/ajax.ashx?action=logincheck&t=" + Math.random(), { username: e, password: t }, function (e) { gav(e, "state") == "1" ? ($a(gav(e, "msg")), window.location.href = n) : $a(gav(e, "msg")) }) } function xuanze() { var e = document.getElementById("seachkeywords").value; e == "请输入关键词搜索" && (e = ""), window.location.href = "/Search/Index.aspx?objtype=product&kwd=" + e } function ChangeFontSize(e, t) { $(e).addClass("cur").siblings("a").removeClass("cur"), $j("cntrBody").css("font-size", t).find("*").css("font-size", t) } function getUrlParms() { var e = new Object, t = location.search.substring(1), n = t.split("&"); for (var r = 0; r < n.length; r++) { var i = n[r].indexOf("="); if (i == -1) continue; var s = n[r].substring(0, i), o = n[r].substring(i + 1); e[s] = unescape(o) } return e } var PTN_EMAIL = /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/, PTN_FLOAT = /\d+(\.\d+)?/; $(function () { $(window).resize(function () { relocation("mesbook1"), relocation("mesbook1_c") }), $(window).scroll(function () { relocation("mesbook1"), relocation("mesbook1_c") }) }), $cookie = function (e, t, n) { if (t == null && n == null) { var r = e + "="; return begin = document.cookie.indexOf(r), begin != -1 ? (begin += r.length, end = document.cookie.indexOf(";", begin), end == -1 && (end = document.cookie.length), document.cookie.substring(begin, end)) : null } if (typeof t == "boolean") $cookie(e, "", -999999); else { n == null && (n = 99864e5); var i = new Date, s = new Date, o = n; s.setTime(i.getTime() + o), document.cookie = e + "=" + t + ";expires=" + s.toGMTString() } }, $(function () { $("#seachkeywords").val("请输入关键词搜索").css({ color: "#666" }), $("#seachkeywords").click(function () { $(this).val("").css({ color: "#000" }) }).blur(function () { $.trim($(this).val()) == "" && $(this).val("请输入关键词搜索").css({ color: "#666" }) }) })
$(function () {
$(".nav ul li .erj").parent().hover(function () {
$(this).addClass("hcur");
}, function () {
$(this).removeClass("hcur");
});
});
/*后添加的*/
/***0.1***/
/**
* @name placeHolder
* @class 跨浏览器placeHolder,对于不支持原生placeHolder的浏览器,通过value或插入span元素两种方案模拟
* @param {Object} obj 要应用placeHolder的表单元素对象
* @param {Boolean} span 是否采用悬浮的span元素方式来模拟placeHolder,默认值false,默认使用value方式模拟
*/
function placeHolder(obj, span) {
if (!obj.getAttribute('placeholder')) return;
var imitateMode = span === true ? true : false;
var supportPlaceholder = 'placeholder' in document.createElement('input');
if (!supportPlaceholder) {
var defaultValue = obj.getAttribute('placeholder');
if (!imitateMode) {
obj.onfocus = function () {
(obj.value == defaultValue) && (obj.value = '');
obj.style.color = '';
}
obj.onblur = function () {
if (obj.value == defaultValue) {
obj.style.color = '';
} else if (obj.value == '') {
obj.value = defaultValue;
obj.style.color = '#ACA899';
}
}
obj.onblur();
} else {
var placeHolderCont = document.createTextNode(defaultValue);
var oWrapper = document.createElement('span');
oWrapper.style.cssText = 'position:absolute; color:#ACA899; display:inline-block; overflow:hidden;';
oWrapper.className = 'wrap-placeholder';
oWrapper.style.fontFamily = getStyle(obj, 'fontFamily');
oWrapper.style.fontSize = getStyle(obj, 'fontSize');
oWrapper.style.marginLeft = parseInt(getStyle(obj, 'marginLeft')) ? parseInt(getStyle(obj, 'marginLeft')) + 3 + 'px' : 3 + 'px';
oWrapper.style.marginTop = parseInt(getStyle(obj, 'marginTop')) ? getStyle(obj, 'marginTop') : 1 + 'px';
oWrapper.style.paddingLeft = getStyle(obj, 'paddingLeft');
oWrapper.style.width = obj.offsetWidth - parseInt(getStyle(obj, 'marginLeft')) + 'px';
oWrapper.style.height = obj.offsetHeight + 'px';
oWrapper.style.lineHeight = obj.nodeName.toLowerCase() == 'textarea' ? '' : obj.offsetHeight + 'px';
oWrapper.appendChild(placeHolderCont);
obj.parentNode.insertBefore(oWrapper, obj);
oWrapper.onclick = function () {
obj.focus();
}
//绑定input或onpropertychange事件
if (typeof (obj.oninput) == 'object') {
obj.addEventListener("input", changeHandler, false);
} else {
obj.onpropertychange = changeHandler;
}
function changeHandler() {
oWrapper.style.display = obj.value != '' ? 'none' : 'inline-block';
}
/**
* @name getStyle
* @class 获取样式
* @param {Object} obj 要获取样式的对象
* @param {String} styleName 要获取的样式名
*/
function getStyle(obj, styleName) {
var oStyle = null;
if (obj.currentStyle) oStyle = obj.currentStyle[styleName];
else if (window.getComputedStyle) oStyle = window.getComputedStyle(obj, null)[styleName];
return oStyle;
}
}
}
}
//window.onload = function () {
// var txtSubEmail = document.getElementById("txtSubscriptionEmail");
// placeHolder(txtSubEmail, true);
//}