jquery怎样jquery获取class的值arlist.jhtml

直接上代码:
&script type="text/javascript"&
var pageIndex = 1; //页面索引初始值
var pageSize = 10; //每页显示条数初始化,修改显示条数,修改这里即可
// 默认什么当前用户所在的城市
$().ready(function () {
getCarBrandPrice(pageIndex, pageSize);
// 获取车型价格列表
function getCarBrandPrice(pageIndex,pageSize ) {
$(".cmain").remove();
url: "asyncHandler.ashx?cmd=GetCarPriceLook&CarStalls=" + $("#hidCarStalls").val() + "&AreaID=" + $("#hidCityID").val()
+ "&MinPrice=" + $("#minPrice").val() + "&MaxPrice=" + $("#maxPrice").val() + "&OrderBy=" + $("#hidOrderBy").val()
+ "&CarBrandID=" + $("#hidCarBrandID").val() + "&r=" + Math.random() + "&pageIndex=" + pageIndex + "&pageSize=" + pageSize,
success: function (response) {
if (response!=null&&response.totalCount & 0) {
$(".cmain").remove();
$("#carlistdiv").append(BuildCarMain(response));
$(".cmain").remove();
$("#carlistdiv").append(BuildCarMain(response));
$("#Pagination").pagination(response.totalCount, {
callback: PageCallback, //PageCallback() 为翻页调用次函数。
prev_text: "& 上一页",
next_text: "下一页 &",
items_per_page: pageSize,
num_display_entries: 5, //连续分页主体部分分页条目数
current_page: pageIndex - 1 //当前页索引
$(".cmain").remove();
$("#carlistdiv").append("&div class=\"cmain\" style='color:text-align:font-size:14;'&对不起,没有符合您所需要的车型!&/div&");
// 分页控件回调事件
function PageCallback(index, jq) {
getCarBrandPrice(index+1, pageSize);
HTML代码:
&div id="carlistdiv" class="car_list" runat="server"&
&div id="Pagination" class="ui-paging"&&/div&
C#后台代码:
private string GetCarPriceLook(HttpContext context)
AnonCarBrandInfoFilter filter = new AnonCarBrandInfoFilter();
filter.sortMode = string.IsNullOrEmpty(context.Request["OrderBy"]) ? "Asc" : TypeParse.ToStr(context.Request["OrderBy"]);
filter.pageIndex = TypeParse.ToInt(context.Request["pageIndex"]);
filter.pageSize = TypeParse.ToInt(context.Request["pageSize"]);
IList&AnonCarBrandInfo& CarBrandlist = B_Car.Instance.GetListForLook(filter);
if (filter.pageIndex & 0)//
CarBrandlist = CarBrandlist .Skip((filter.pageIndex - 1) * filter.pageSize).Take(filter.pageSize).ToList(); ;
return JsonConvert.SerializeObject(new
DataList = CarBrandlist ,
totalCount = filter.totalCount
阅读(...) 评论()1327人阅读
CSS页面(30)
之前在网上搜索了一大堆,没看到几个靠谱的,决定自己看文档,调试解决
后面终于找到了解决方法,直接贴样例代码
想动态更新的话,主要在于后台传到前台的tree的数据格式,在这里面就可以更改图标了
listTerminal =
gpsDataService.getTerminalList();
listJsonTerminals = new ArrayList&Map&String,Object&&();
for(int i=0;i&listTerminal.size();i++){
terminalMap = new HashMap&String,Object&();
terminalMap.put(&id&, i+1);
terminalMap.put(&text&,listTerminal.get(i).getTerminalId());
terminalMap.put(&iconCls&, &icon-Offline&);//加上图标
listJsonTerminals.add(terminalMap);
return &terminal&;
另外点击后动态更改图标的代码
$(&#ul-carTree&).tree(&update&,{target:carList[i].target,text:&icon-haha&,iconCls:&icon-Online&});//更新结点
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:211370次
积分:4871
积分:4871
排名:第4076名
原创:191篇
转载:454篇
译文:13篇
评论:15条
(1)(3)(5)(5)(1)(1)(6)(31)(30)(110)(19)(22)(40)(46)(115)(144)(77)4395人阅读
import com.gargoylesoftware.htmlunit.BrowserV
import com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxC
import com.gargoylesoftware.htmlunit.WebC
import com.gargoylesoftware.htmlunit.html.HtmlE
import com.gargoylesoftware.htmlunit.html.HtmlP
import com.gargoylesoftware.htmlunit.javascript.host.MouseE
public class suning {
private WebClient webC
private HtmlP
public void init(Integer timeout) {
webClient = new WebClient(BrowserVersion.getDefault());
webClient.setAjaxController(new NicelyResynchronizingAjaxController());
setTimeout(timeout);
webClient.getOptions().setJavaScriptEnabled(true);
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
webClient.getOptions().setThrowExceptionOnScriptError(false);
webClient.getOptions().setCssEnabled(true);
public void setTimeout(Integer timeout) {
webClient.getOptions().setTimeout(timeout * 1000);
webClient.setJavaScriptTimeout(timeout / 5 * 1000);
webClient.waitForBackgroundJavaScript(timeout * 1000);
public void collect(String url) {
page = webClient.getPage(url);
} catch (Exception e) {
e.printStackTrace();
public void test() {
String url = &file:///C:/Users/admin/Desktop/1.html&;
// url = &&;
collect(url);
HtmlElement htmlElement = page.getDocumentElement();
HtmlElement domNodeContainer = (HtmlElement) HtmlUnitUtils.select(
page.getDocumentElement(), &#category dl&).get(0);
// for (int i = 0; i & 10000; i++)
domNodeContainer.fireEvent(MouseEvent.TYPE_MOUSE_OVER);
// domNodeContainer.fireEvent(MouseEvent.TYPE_MOUSE_OVER);
// HtmlPage page = domNodeContainer.click();
System.out.println(&-------------&);
Thread.sleep(10000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println(&-------------&);
System.out.println(page.asXml());
public static void main(String args[]) {
suning suning = new suning();
suning.test();
&!DOCTYPE html PUBLIC &-//W3C//DTD XHTML 1.0 Transitional//EN& &http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&&
&html xmlns=&http://www.w3.org/1999/xhtml&&
&meta http-equiv=&Content-Type& content=&text/ charset=utf-8&/&
&script type=&text/javascript&&
//全局变量
var sn = sn || {
&context& : '/emall',
&domain& : '',
&storeId& : '10052',
&catalogId& : '10051',
&categoryId& : '10051',
&memberDomain& : '',
&online& : '',
&cookieDomain& : '.',
&searchDomain& : '/emall/',
&scriptDomianDir& : ''
var _domain = ''.indexOf(&.&);
document.domain = ''.substring(_domain+1);
--&&!-- 公用头部 [[ --&&!-- 如果没有顶通,则不展示顶通和卷帘 --&&!-- 顶通 ]] --&&!-- 公用头部 [[ --&
&div class=&g-all-sort&&
&h3 class=&all-hook&&&a name=&homepage_toubu_biaoqian14& target=&_blank& href=&/emall/pgv__1_.html&&全部商品分类&/a&&em id=&allSort_drop_icon&&&/em&&/h3&
&div class=&category cityId_replace& id=&category&&
&!--[if lt IE 7]&&iframe class=&category-mask&&&/iframe&&![endif]--&
&a target=&_blank& name=&homepage_title_zhuc0101& href=&/shoujitongxun.html&&手机&/a&
&a target=&_blank& name=&homepage_title_zhuc0102& href=&/sheyingshexiang.html&&相机&/a&
&a target=&_blank& name=&homepage_title_zhuc0103& href=&/diannao.html&&电脑&/a&
&div class=&category-open hide& id=&subCategory&&&/div&
&!-- 公告 ]] --&
&script language=&javascript& src=&/javascript/jquery.js?v=&&&/script&
&!-- 顶通 js --&
&!-- JS懒加载 --&
&script type=&text/javascript&&
* 2013新版头尾基础js方法
var SFE = SFE || {};
// 头尾等基础方法,依赖于 jquery
SFE.base = (function ($) {
var httpType=(&https:&==document.location.protocol)?&https&:&http&;
// 是否IE6
var isIE6 = function () {
return !!window.ActiveXObject && !window.XMLHttpR
// 安全连接的IE6下iframe的src
var iframeHttpsSrc = '';
if (httpType == &https&) {
iframeHttpsSrc = ' src=&/images/ShoppingArea/Common/blankbg.gif& ';
// 取 cookie 中的值
var d = function (b) {
return (a = document.cookie.match(RegExp(&(^| )& + b + &=([^;]*)(;|$)&))) ? decodeURIComponent(a[2]
.replace(/\+/g, &%20&))
// 头部工具条展开
var toolBarOpen = function () {
$(&.tool-link&).children(&dl.child-node&).hover(function () {
$(this).addClass(&hover&);
}, function () {
$(this).removeClass(&hover&);
// 头部工具条欢迎词
var toolBarWelcome = function () {
var b, a = d(&logonStatus&);
if (a != null && a != &&) {
var c = d(&nick&);
var h = new Date().getHours();
var t = &&;
if (h &= 0 && h & 3) {
t = &夜深了&;
} else if (h &= 3 && h & 7) {
t = &早上好&;
} else if (h &= 7 && h & 12) {
t = &上午好&;
} else if (h &= 12 && h & 15) {
t = &中午好&;
} else if (h &= 15 && h & 18) {
t = &下午好&;
} else if (h &= 18 && h & 24) {
t = &晚上好&;
c == null && (c = &&);
a == 2 ? b = c + ',' + t + ',欢迎回来!' : a == 0 ? b = c + '!邮箱还未绑定,请&a href=&https://'+ sn.memberDomain + sn.context + '/SNBindEmailCheckCmd?storeId=10052&catalogId=10051& title=&立即绑定&&立即绑定&/a&' : a == 1 && (b = c + '!手机还未验证,请&a href=&https://'+ sn.memberDomain + sn.context + '/ActivateMobileView?storeId=10052&catalogId=10051& title=&立即验证&&立即验证&/a&');
b += '&&&a href=&javascript:SFE.base.logoff();& title=&退出& target=&_top&&退出&/a&';
$(&#toolBarWelcome&).html(b);
$(&#logReg&).hide();
// 登录跳转
var logonurl = function () {
if (!toolBarWelcome()) {
var logonurl = &&;
if (window.location.href.indexOf(&&MyURL&) != -1) {
var v3 = window.location.href.substring(window.location.href
.indexOf(&&MyURL&) + 7, window.location.href.length)
if ((v3.indexOf(&LogonForm&) != -1)
|| (v3.indexOf(&SNUserRegisterView&) != -1)
|| (v3.indexOf(&ForgotPasswordView&) != -1)
|| (v3.indexOf(&ForgotCardPswView&) != -1)
|| (v3.indexOf(&MobileActCode&) != -1)
|| (v3.indexOf(&ResetPassword&) != -1)
|| (v3.indexOf(&ForgotPasswordCheckMail&) != -1)
|| (v3.indexOf(&ForgotPasswordSendMailView&) != -1)
|| (v3.indexOf(&ChangeCardPwdWithIdCard&) != -1)
|| (v3.indexOf(&SNNormalMobileRegisterCmd&) != -1)
|| (v3.indexOf(&SNCampusMobileRegisterCmd&) != -1)
|| (v3.indexOf(&SNCampusEmailRegisterCmd&) != -1)
|| (v3.indexOf(&MbrCardInputView&) != -1)
|| (v3.indexOf(&SNMbrCardMergeOptionView&) != -1)
|| (v3.indexOf(&SNMbrCardMergeNewAccountView&) != -1)
|| (v3.indexOf(&SNMbrCardMergeOtherAccountView&) != -1)
|| (v3.indexOf(&SNMbrCardCheckCmd&) != -1)
|| (v3.indexOf(&SNMbrCardVerifyMyInfoCmd&) != -1)
|| (v3.indexOf(&SNMbrCardMergeNewAccountCmd&) != -1)
|| (v3.indexOf(&SNMbrCardMergeOtherAccountCmd&) != -1)
|| (v3.indexOf(&SNMbrCardMergeOtherVerifyMobileCmd&) != -1)
|| (v3.indexOf(&SNMbrCardMergeOtherVerifyEmailCmd&) != -1)
|| (v3.indexOf(&SNMbrCardMergeOtherVerifyNewMobileCmd&) != -1)
|| (v3.indexOf(&SNMbrCardMergeCmd&) != -1)) {
logonurl = &https://&
+ sn.memberDomain
+ sn.context
+ &/LogonForm?storeId=&
+ sn.storeId
+ &&catalogId=&
+ sn.catalogId
+ encodeURIComponent(&http://& + sn.domain + sn.context
+ &/tcd_& + sn.storeId + &_& + sn.catalogId
+ &_.html&);
logonurl = &https://& + sn.memberDomain
+ sn.context + &/LogonForm?storeId=& + sn.storeId
+ &&catalogId=& + sn.catalogId + &&URL=& + v3;
} else if (window.location.href.indexOf(&&URL&) != -1) {
var v1 = window.location.href.substring(window.location.href
.indexOf(&&URL&) + 5, window.location.href.length);
if ((v1.indexOf(&LogonForm&) != -1)
|| (v1.indexOf(&SNUserRegisterView&) != -1)
|| (v1.indexOf(&ForgotPasswordView&) != -1)
|| (v1.indexOf(&ForgotCardPswView&) != -1)
|| (v1.indexOf(&MobileActCode&) != -1)
|| (v1.indexOf(&ResetPassword&) != -1)
|| (v1.indexOf(&ForgotPasswordCheckMail&) != -1)
|| (v1.indexOf(&ForgotPasswordSendMailView&) != -1)
|| (v1.indexOf(&ChangeCardPwdWithIdCard&) != -1)
|| (v1.indexOf(&SNNormalMobileRegisterCmd&) != -1)
|| (v1.indexOf(&SNCampusMobileRegisterCmd&) != -1)
|| (v1.indexOf(&SNCampusEmailRegisterCmd&) != -1)
|| (v1.indexOf(&MbrCardInputView&) != -1)
|| (v1.indexOf(&SNMbrCardMergeOptionView&) != -1)
|| (v1.indexOf(&SNMbrCardMergeNewAccountView&) != -1)
|| (v1.indexOf(&SNMbrCardMergeOtherAccountView&) != -1)
|| (v1.indexOf(&SNMbrCardCheckCmd&) != -1)
|| (v1.indexOf(&SNMbrCardVerifyMyInfoCmd&) != -1)
|| (v1.indexOf(&SNMbrCardMergeNewAccountCmd&) != -1)
|| (v1.indexOf(&SNMbrCardMergeOtherAccountCmd&) != -1)
|| (v1.indexOf(&SNMbrCardMergeOtherVerifyMobileCmd&) != -1)
|| (v1.indexOf(&SNMbrCardMergeOtherVerifyEmailCmd&) != -1)
|| (v1.indexOf(&SNMbrCardMergeOtherVerifyNewMobileCmd&) != -1)
|| (v1.indexOf(&SNMbrCardMergeCmd&) != -1)) {
logonurl = &https://&
+ sn.memberDomain
+ sn.context
+ &/LogonForm?storeId=&
+ sn.storeId
+ &&catalogId=&
+ sn.catalogId
+ encodeURIComponent(&http://& + sn.domain + sn.context
+ &/tcd_& + sn.storeId + &_& + sn.catalogId
+ &_.html&);
logonurl = &https://& + sn.memberDomain
+ sn.context + &/LogonForm?storeId=& + sn.storeId
+ &&catalogId=& + sn.catalogId + &&URL=& + v1;
var v2 = window.location.href.substring(window.location.href
.lastIndexOf(&/&) + 1, window.location.href.length);
if ((v2.indexOf(&LogonForm&) != -1)
|| (v2.indexOf(&SNUserRegisterView&) != -1)
|| (v2.indexOf(&ForgotPasswordView&) != -1)
|| (v2.indexOf(&ForgotCardPswView&) != -1)
|| (v2.indexOf(&MobileActCode&) != -1)
|| (v2.indexOf(&ResetPassword&) != -1)
|| (v2.indexOf(&ForgotPasswordCheckMail&) != -1)
|| (v2.indexOf(&ForgotPasswordSendMailView&) != -1)
|| (v2.indexOf(&ChangeCardPwdWithIdCard&) != -1)
|| (v2.indexOf(&SNNormalMobileRegisterCmd&) != -1)
|| (v2.indexOf(&SNCampusMobileRegisterCmd&) != -1)
|| (v2.indexOf(&SNCampusEmailRegisterCmd&) != -1)
|| (v2.indexOf(&MbrCardInputView&) != -1)
|| (v2.indexOf(&SNMbrCardMergeOptionView&) != -1)
|| (v2.indexOf(&SNMbrCardMergeNewAccountView&) != -1)
|| (v2.indexOf(&SNMbrCardMergeOtherAccountView&) != -1)
|| (v2.indexOf(&SNMbrCardCheckCmd&) != -1)
|| (v2.indexOf(&SNMbrCardVerifyMyInfoCmd&) != -1)
|| (v2.indexOf(&SNMbrCardMergeNewAccountCmd&) != -1)
|| (v2.indexOf(&SNMbrCardMergeOtherAccountCmd&) != -1)
|| (v2.indexOf(&SNMbrCardMergeOtherVerifyMobileCmd&) != -1)
|| (v2.indexOf(&SNMbrCardMergeOtherVerifyEmailCmd&) != -1)
|| (v2.indexOf(&SNMbrCardMergeOtherVerifyNewMobileCmd&) != -1)
|| (v2.indexOf(&SNMbrCardMergeCmd&) != -1)) {
logonurl = &https://&
+ sn.memberDomain
+ sn.context
+ &/LogonForm?storeId=&
+ sn.storeId
+ &&catalogId=&
+ sn.catalogId
+ encodeURIComponent(&http://& + sn.domain + sn.context
+ &/tcd_& + sn.storeId + &_& + sn.catalogId
+ &_.html&);
if (window.location.href.substring(
window.location.href.lastIndexOf(&/&) + 1,
window.location.href.length).indexOf(
&CxnyProductSearch&) != -1) {
logonurl = &https://& + sn.memberDomain
+ sn.context + &/LogonForm?adId=& + sn.adId
+ &&storeId=& + sn.storeId + &&catalogId=&
+ sn.catalogId + &&URL=&
+ encodeURIComponent(window.location.href);
if (window.location.href.substring(window.location.href
.lastIndexOf(&/&) + 1, window.location.href.length) == ''
&&window.location.href.match(&(.*?redbaby.*?)&)==null
&&window.location.href.match(&(.*?binggo.*?)&)==null) {
logonurl = &https://&
+ sn.memberDomain
+ sn.context
+ &/LogonForm?storeId=&
+ sn.storeId
+ &&catalogId=&
+ sn.catalogId
+ encodeURIComponent(&http://& + sn.domain
+ sn.context + &/tcd_& + sn.storeId
+ &_& + sn.catalogId + &_.html&);
logonurl = &https://& + sn.memberDomain
+ sn.context + &/LogonForm?storeId=&
+ sn.storeId + &&catalogId=& + sn.catalogId
+ encodeURIComponent(window.location.href);
hrefLink(logonurl);
var logoff = function(){
var date = new Date();
date.setTime(date.getTime() - 10000);
document.cookie = &logonStatus=a; expires=& + date.toGMTString();
window.location = 'http://' + sn.memberDomain + sn.context + '/Logoff?storeId=10052&URL=SNSendRedirectCmd';
// 注册跳转
var registerurl = function () {
var registerurl = &&;
if (window.location.href.indexOf(&&URL&) != -1) {
registerurl = window.location.href.substring(window.location.href
.indexOf(&&URL&) + 5, window.location.href.length);
if ((registerurl.indexOf(&LogonForm&) != -1)
|| (registerurl.indexOf(&SNUserRegisterView&) != -1)
|| (registerurl.indexOf(&ForgotPasswordView&) != -1)
|| (registerurl.indexOf(&SNUserRegisterView&) != -1)
|| (registerurl.indexOf(&ForgotPasswordCheckMail&) != -1)
|| (registerurl.indexOf(&ForgotPasswordSendMailView&) != -1)
|| (registerurl.indexOf(&ChangeCardPwdWithIdCard&) != -1)) {
registerurl = &https://&
+ sn.memberDomain
+ sn.context
+ &/SNUserRegisterView?storeId=&
+ sn.storeId
+ &&catalogId=&
+ sn.catalogId
+ &&MyURL=&
+ encodeURIComponent(&http://& + sn.domain + sn.context
+ &/tcd_& + sn.storeId + &_& + sn.catalogId
+ &_.html&);
registerurl = &https://& + sn.memberDomain + sn.context
+ &/SNUserRegisterView?storeId=& + sn.storeId
+ &&catalogId=& + sn.catalogId + &&MyURL=& +
} else if (window.location.href.indexOf(&&MyURL&) != -1) {
var v1 = window.location.href.substring(window.location.href
.indexOf(&&MyURL&) + 7, window.location.href.length);
if ((v1.indexOf(&LogonForm&) != -1)
|| (v1.indexOf(&SNUserRegisterView&) != -1)
|| (v1.indexOf(&ForgotPasswordView&) != -1)
|| (v1.indexOf(&SNUserRegisterView&) != -1)
|| (v1.indexOf(&ForgotPasswordCheckMail&) != -1)
|| (v1.indexOf(&ForgotPasswordSendMailView&) != -1)
|| (v1.indexOf(&ChangeCardPwdWithIdCard&) != -1)) {
registerurl = &https://&
+ sn.memberDomain
+ sn.context
+ &/SNUserRegisterView?storeId=&
+ sn.storeId
+ &&catalogId=&
+ sn.catalogId
+ &&MyURL=&
+ encodeURIComponent(&http://& + sn.domain + sn.context
+ &/tcd_& + sn.storeId + &_& + sn.catalogId
+ &_.html&);
registerurl = &https://& + sn.memberDomain + sn.context
+ &/SNUserRegisterView?storeId=& + sn.storeId
+ &&catalogId=& + sn.catalogId + &&MyURL=& + v1;
} else if (window.location.href.indexOf(&&krypto&) != -1) {
var v1 = window.location.href.substring(window.location.href
.lastIndexOf(&/&) + 1, window.location.href.indexOf(&&krypto&));
if ((v1.indexOf(&LogonForm&) != -1)
|| (v1.indexOf(&SNUserRegisterView&) != -1)
|| (v1.indexOf(&ForgotPasswordView&) != -1)
|| (v1.indexOf(&SNUserRegisterView&) != -1)
|| (v1.indexOf(&ForgotPasswordCheckMail&) != -1)
|| (v1.indexOf(&ForgotPasswordSendMailView&) != -1)
|| (v1.indexOf(&ChangeCardPwdWithIdCard&) != -1)) {
registerurl = &https://&
+ sn.memberDomain
+ sn.context
+ &/SNUserRegisterView?storeId=&
+ sn.storeId
+ &&catalogId=&
+ sn.catalogId
+ &&MyURL=&
+ encodeURIComponent(&http://& + sn.domain + sn.context
+ &/tcd_& + sn.storeId + &_& + sn.catalogId
+ &_.html&);
registerurl = &https://&
+ sn.memberDomain
+ sn.context
+ &/SNUserRegisterView?storeId=&
+ sn.storeId
+ &&catalogId=&
+ sn.catalogId
+ &&MyURL=&
+ encodeURIComponent(window.location.href.substring(0,
window.location.href.indexOf(&&krypto&)));
var v2 = window.location.href.substring(window.location.href
.lastIndexOf(&/&) + 1, window.location.href.length);
if ((v2.indexOf(&LogonForm&) != -1)
|| (v2.indexOf(&SNUserRegisterView&) != -1)
|| (v2.indexOf(&ForgotPasswordView&) != -1)
|| (v2.indexOf(&SNUserRegisterView&) != -1)
|| (v2.indexOf(&ForgotPasswordCheckMail&) != -1)
|| (v2.indexOf(&ForgotPasswordSendMailView&) != -1)
|| (v2.indexOf(&ChangeCardPwdWithIdCard&) != -1)) {
registerurl = &https://&
+ sn.memberDomain
+ sn.context
+ &/SNUserRegisterView?storeId=&
+ sn.storeId
+ &&catalogId=&
+ sn.catalogId
+ &&MyURL=&
+ encodeURIComponent(&http://& + sn.domain + sn.context
+ &/tcd_& + sn.storeId + &_& + sn.catalogId
+ &_.html&);
registerurl = &https://& + sn.memberDomain + sn.context
+ &/SNUserRegisterView?storeId=& + sn.storeId
+ &&catalogId=& + sn.catalogId + &&MyURL=&
+ encodeURIComponent(window.location.href);
hrefLink(registerurl);
// 加入收藏
var addFavorite = function () {
var d = &/&;
var c = &苏宁易购-苏宁云商网上商城,领先的综合网上购物商城,正品行货,全国联保,货到付款,让您尽享购物乐趣!&;
if (document.all) {
window.external.AddFavorite(d, c);
} else if (window.sidebar) {
window.sidebar.addPanel(c, d, &&);
alert(&对不起,您的浏览器不支持此操作!\n请您使用菜单栏或Ctrl+D收藏本站。&);
// 在线客服
var onlineService = function () {
window.open(&http://& + sn.online + &/webchat/index.jsp?tabId=0&, &webcallpage&, &height=530,width=800,directories=no,location=no,scrollbars=yes, resizable=yes, toolbar=no, menubar=no,status=no&)
// 城市专区链接
var setCityUrl = function() {
var city = $(&.cityUrl&) || &9173&;
var cityId =
d(&cityId&) || &9173&;;
if (city.length & 0) {
var cityArr = [];
var cityDomain = getCityDomain();
cityArr[&9173&] = &http://nanjing& + cityD
cityArr[&9017&] = &http://beijing& + cityD
cityArr[&9264&] = &http://shanghai& + cityD
cityArr[&9325&] = &http://chongqing& + cityD
cityArr[&9041&] = &http://guangzhou& + cityD
cityArr[&9281&] = &http://tianjin& + cityD
cityArr[&9051&] = &http://shenzhen& + cityD
cityArr[&9254&] = &http://xian& + cityD
cityArr[&9315&] = &http://hangzhou& + cityD
cityArr[&9197&] = &http://shenyang& + cityD
cityArr[&9265&] = &http://chengdu& + cityD
cityArr[&9135&] = &http://wuhan& + cityD
if (!!cityArr[cityId]) {
url = cityArr[cityId];
url = cityArr[&9173&];
city.live(&mouseover&, function () {
$(this).attr(&href&, url);
$(this).removeClass(&cityUrl&);
//替换链接中的cityId
var setSearchCity = function (selector) {
var city = $(selector);
if (city != null && city.length & 0) {
//绑定mouseover事件,替换cityId=xxx
city.live(&mouseover&, function () {
replaceCityParam(this);
//绑定onclick事件,替换{cityId}占位符,忽略大小写
city.click(function(){
replaceCityPlaceHolder(this);
//替换cityId参数cityId=xxx
function replaceCityParam(obj){
var cityId =
d(&cityId&) || &9173&;
var href=$(obj).attr(&href&);
//判断是否cityId为最后一个参数,是的话不需要加&,否则要加&
var split=href.match(/cityId=.*&/gi)==null?&&:&&&;
//替换cityId=后面的字符串或数字,直到第一个&或结尾,忽略大小写
$(obj).attr(&href&, href.replace(/cityId=.*?&|cityId=.*$/gi, &cityId=&+cityId+split));
//替换城市id占位符{cityId}
function replaceCityPlaceHolder(obj){
var cityId =
d(&cityId&) || &9173&;
url = $(obj).attr(&href&).replace(/{cityId}/gi, cityId).replace(/%7bcityId%7d/gi, cityId);
$(obj).attr(&href&, url);
function getCityDomain() {
var ego_pre_v7_reg = /^(\w*)(pre)(\w*)(.)$/;
var ego_sit_v7_reg = /^(\w*)(sit)([1-5].)$/;
var _hostName = document.location.
var _cityDomain = &.&;
if (ego_pre_v7_reg.test(_hostName)) {
_cityDomain = &&;
} else if (ego_sit_v7_reg.test(_hostName)) {
_cityDomain = &&;
return _cityD
// 搜索热门关键词及默认关键词方法
var getSearchKeyword = function () {
// 发送查询请求
var daMain = sn.searchDomain.replace(&http&, httpType);
url: daMain + &hotkeywords.xjsonp?categoryId=& + getCategoryId(),
type: &get&,
dataType: &jsonp&,
success: function (data) {
var html = data.html.replace(&{cityId}&, d(&cityId&));
$(&#snKeywordNew&).html(html);
// 默认搜索词
var searchDefaultKeyword = $(&#searchDefaultKeyword&).val();
$(&#searchKeywords&).val(searchDefaultKeyword);
} catch (e) {
// 搜索框焦点事件
var searchInputEvent = function () {
// 搜索按钮滑过
$(&#searchSubmit&).hover(function () {
$(this).addClass(&search-btn-hover&);
}, function () {
$(this).removeClass(&search-btn-hover&);
// 鼠标焦点事件
var obj = $(&#searchKeywords&);
obj.focus(function () {
obj.parents(&.g-search&).addClass(&g-search-focus&);
var value = $(this).val(),
searchDefaultKeyword = $(&#searchDefaultKeyword&).val() || &&;
if (value == searchDefaultKeyword) {
obj.val(&&).css({color: &#000&});
}).blur(function () {
obj.parents(&.g-search&).removeClass(&g-search-focus&);
var value = $.trim($(this).val()),
searchDefaultKeyword = $(&#searchDefaultKeyword&).val() || &&;
if (value == &&) {
obj.val(searchDefaultKeyword).css({color: &#999&});
// 搜索关键词自动完成
var searchCatalogId = &&;
var searchAutoComplete = function () {
var isIE6 = !!window.ActiveXObject && !window.XMLHttpR
var obj = $(&#searchKeywords&);
var delay = 200, timer, resultBox = $(&#ac_results&);
if (resultBox.size() == 0) {
$('&div class=&g-ac-results& id=&ac_results& style=&display:&&&/div&').appendTo(&.g-search&);
resultBox = $(&#ac_results&);
// 联想条目鼠标滑过及点击事件
resultBox.delegate(&li&, &hover&,function () {
$(this).addClass(&ac_over&).siblings().removeClass(&ac_over&);
}).delegate(&li&, &click&, function () {
if ($(this).attr(&categoryid&) != &&) {
searchCatalogId = $(this).attr(&categoryid&);
searchCatalogId = &&;
obj.val($(this).find(&.keyname&).text());
resultBox.hide();
resultListCurrentIndex = -1;
$(&#searchSubmit&).click();
// 通过键盘选择搜索词
var resultListCurrentIndex = -1;
var selectKeywordByKey = function (n) {
var resultBox = $(&#ac_results&),
results = resultBox.find(&li&),
maxCount = results.size();
if (resultBox.is(&hidden&) || results.size() == 0 || Math.abs(n) != 1) {
resultListCurrentIndex +=
if (resultListCurrentIndex & 0) {
resultListCurrentIndex = maxCount - 1;
if (resultListCurrentIndex == maxCount) {
resultListCurrentIndex = 0;
var currentKeywords = results.eq(resultListCurrentIndex);
results.removeClass(&ac_over&);
currentKeywords.addClass(&ac_over&);
if (currentKeywords.attr(&categoryid&)) {
searchCatalogId = currentKeywords.attr(&categoryid&);
searchCatalogId = &&;
obj.val(currentKeywords.find(&.keyname&).text());
// 按键抬起,向服务端发送请求
obj.keyup(function (event) {
if (event.which == 13 || event.which == 38 || event.which == 40) {
clearTimeout(timer);
timer = setTimeout(function () {
var keyword = $.trim($(&#searchKeywords&).val());
if (keyword.length == 0) {
resultBox.hide();
var daMain = sn.searchDomain.replace(&http&, httpType);
url: daMain + &autocomplete.jsonp&,
dataType: &jsonp&,
jsonpCallback : &autoComplateCallback&,
categoryId : getSearchCategoryId(),
keyword: keyword
success: function (data) {
if (data.words.length == 0) {
resultBox.hide();
resultListCurrentIndex = -1;
resultBox.show();
var resultDom = '&ul&';
$(data.words).each(function (key, value) {
if (typeof value.categoryName != &undefined&) {
resultDom += '&li categoryid=&' + value.categoryId + '& class=&cateSearch&&在&b&' + value.categoryName + '&/b&分类 中搜索&span style=&display:& class=&keyname&&' + value.keyname + '&/span&&/li&'
resultDom += '&li&&span class=&keyname&&' + value.keyname + '&/span&&/li&'
resultDom += '&/ul&';
resultBox.html(resultDom);
resultBox.find(&.cateSearch:last&).addClass(&bottom&);
resultListCurrentIndex = -1;
}, delay);
}).keydown(function (event) {
// 按键按下,检测是否为上下方向键
if (event.which == 13) { // 回车键
resultBox.hide();
resultListCurrentIndex = -1;
$(&#searchSubmit&).click();
if (event.which == 38) { // 上方向键
selectKeywordByKey(-1);
if (event.which == 40) { // 下方向键
selectKeywordByKey(1);
}).click(function () {
$(document).click(function () {
resultBox.hide();
resultListCurrentIndex = -1;
//获取默认词目录
function getCategoryId()
var categoryId = &0&;
if(sn.catalogId == &22001& || window.location.href.match(&(.*?.*?)&)){//图书已有热门关键字
//图书四级页面
if(sn.pgFlag == &22001_4&){
categoryId = sn.searchCategoryId;
//图书首页
}else if(sn.pgFlag == &22001_1&){
categoryId = &1&;
//图书二级页面
}else if(sn.pgFlag == &22001_2&){
categoryId = sn.searchCategoryId;
categoryId = &1&;
if(categoryId == &undefined&){
categoryId =&1&;
return categoryId;
//var url = window.location.
var urlForSug = window.location.href.substring(window.location.href.lastIndexOf(&/&));
if(null !=
urlForSug && &&!=urlForSug){
var urlForSugTmp= urlForSug.match(&/[A-Za-z]+&);
if(null !=urlForSugTmp && urlForSugTmp[0].match(&(^/strd$)|(^/sprd$)|(^/prd$)|(^/ProductDisplay$)|(^/cd$)|(^/pcd$)|(^/wine$)&))
if(urlForSugTmp[0].match(&(^/strd$)|(^/cd$)&))//三级、二级目录
categoryId=sn.categoryId;
else if(urlForSugTmp[0].match(&(^/wine$)&))//酒频道
categoryId=&0&;
else if(urlForSugTmp[0].match(&(^/pcd$)&))//2.5级页面
categoryId=&0&;
}else if(urlForSugTmp[0].match(&(^/prd$)&) || urlForSugTmp[0].match(&(^/sprd$)&) )//四级目录
categoryId=sn.categoryId;
}else//priductdisplay形式的四级目录
categoryId=sn.categoryId;
//短域名获取默认词
else if(typeof(sn.pgFlag)!=&undefined& && null !=sn.pgFlag)
if(sn.pgFlag == &10051_2&)//二级目录
categoryId=sn.categoryId;
else if(sn.pgFlag == &&)//2.5级页面
categoryId=&0&;
}else if(sn.pgFlag == &10051_4&)//四级目录
categoryId=sn.categoryId;
}else if(window.location.href.match(&(.*?redbaby.*?)&)!=null
|| window.location.href.match(&(.*?14655.*?)&)!=null
|| window.location.href.match(&(.*?mysec.*?)&)!=null
|| window.location.href.match(&(.*?mytop.*?)&)!=null
|| window.location.href.match(&(.*?fashion.*?)&)!=null
|| window.location.href.match(&(.*?guide.*?)&)!=null)//红孩子母婴页面
categoryId =&2&;
}else if(window.location.href.match(&(.*?binggo.*?)&)!=null
|| window.location.href.match(&(.*?14656.*?)&)!=null
|| window.location.href.match(&(.*?mztop.*?)&)!=null
|| window.location.href.match(&(.*?mzsec.*?)&)!=null)//红孩子美妆页面
categoryId =&3&;
}else if((null !=urlForSugTmp && urlForSugTmp[0].match(&(^/tcd$)&))||(urlForSug==&/&))//首页
categoryId =&0&;
}else if(null != urlForSugTmp && urlForSugTmp[0].match(&(^/brandhome$)|(^/brand$)&) || ( window.location.href.match(&(.*?brand.*?)&)!=null ))//品牌旗舰店页面
categoryId =&0&;
categoryId =&0&;
if(categoryId == &undefined&){
categoryId =&0&;
return categoryId;
//获取联想词目录
function getSearchCategoryId()
var categoryId = &0&;
if(sn.catalogId == &22001& || window.location.href.match(&(.*?.*?)&)){
categoryId =&1&;
return categoryId;
var urlForSug = window.location.href.substring(window.location.href.lastIndexOf(&/&));
if(null !=
urlForSug && &&!=urlForSug){
var urlForSugTmp= urlForSug.match(&/[A-Za-z]+&);
if(null !=urlForSugTmp && urlForSugTmp[0].match(&(^/strd$)|(^/sprd$)|(^/prd$)|(^/ProductDisplay$)|(^/cd$)|(^/pcd$)|(^/wine$)&))
if(sn.newCatalogId == &14655&){
categoryId=&2&;
}else if(sn.newCatalogId == &14656&){
categoryId=&3&;
categoryId=&0&;
//短域名获取categoryId
}else if(typeof(sn.pgFlag)!=&undefined& && null !=sn.pgFlag){
if(sn.newCatalogId == &14655&){
categoryId=&2&;
}else if(sn.newCatalogId == &14656&){
categoryId=&3&;
categoryId=&0&;
else if(window.location.href.match(&(.*?redbaby.*?)&)!=null
|| window.location.href.match(&(.*?14655.*?)&)!=null
|| window.location.href.match(&(.*?mysec.*?)&)!=null
|| window.location.href.match(&(.*?mytop.*?)&)!=null
|| window.location.href.match(&(.*?fashion.*?)&)!=null
|| window.location.href.match(&(.*?guide.*?)&)!=null)//红孩子母婴页面
categoryId =&2&;
}else if(window.location.href.match(&(.*?binggo.*?)&)!=null
|| window.location.href.match(&(.*?14656.*?)&)!=null
|| window.location.href.match(&(.*?mztop.*?)&)!=null
|| window.location.href.match(&(.*?mzsec.*?)&)!=null)//红孩子美妆页面
categoryId =&3&;
}else if((null !=urlForSugTmp && urlForSugTmp[0].match(&(^/tcd$)&))||(urlForSug==&/&))//首页
categoryId =&0&;
}else if(null != urlForSugTmp && urlForSugTmp[0].match(&(^/brandhome$)|(^/brand$)&) || ( window.location.href.match(&(.*?brand.*?)&)!=null ))//品牌旗舰店页面
categoryId =&0&;
categoryId =&0&;
if(categoryId == &undefined&){
categoryId =&0&;
return categoryId;
// 搜索提交
var onSubmitSearch = function () {
var obj = $('#searchKeywords');
var tmp = $.trim(obj.val());
if (tmp == '') {
obj.focus();
var url = sn.searchDomain + &search.do?keyword=& + encodeURIComponent(tmp);
if(sn.categoryId == &22001&){
// 图书搜索
url = sn.searchDomain + &bookSearch.do?keyword=& + encodeURIComponent(tmp);
if(sn.categoryId == &253005&){
// 母婴搜索
url += &&ch=1&;
if(sn.categoryId == &26001&){
// 美妆搜索
url += &&ch=2&;
if (searchCatalogId != &&) {
url += &&ci=& + searchCatalogId;
url += &&cityId=& + d(&cityId&);
window.location.href =
// 购物车数字初始化
var miniCartInt = function () {
var itemLength = d(&totalProdQty&) || 0;
$(&#showTotalQty&).text(itemLength);
// 查询购物车内容
function invokeMiniCart() {
var url = httpType+&://& + sn.domain + sn.context + &/MiniCartSearchView?catalogId=& + sn.catalogId + &&storeId=& + sn.storeId;
type: &get&,
dataType: &jsonp&,
success: function (data) {
var listBox = $(&#snCarlist&);
if (isIE6()) {
data = '&iframe class=&cartMask&' + iframeHttpsSrc + '&&/iframe&' +
listBox.html(data);
$(&.cartMask&).height($(&#snCarlist&).height());
//alert(&请注意,查询购物车返回的数据需要使用新的格式!此处错乱因结构变更。&);
listBox.find(&.mycarDel&).each(function () {
var i = $(this);
var k = i.attr(&exdata&);
var l = k.split(&,&)[0];
i.click(function () {
miniCart_deleteOrderItem(l);
return false
error: function () {
$(&#snCarlist&).html('&h3 id=&noGoods& class=&noGoods hide&&&em&&/em&您的购物车是空的,赶紧选购吧!&/h3&');
// 删除购物车内容
function miniCart_deleteOrderItem(b) {
var url = httpType+&://& + sn.domain + sn.context + &/SNCartOperationCmd?method=deleteItem&;
type: &get&,
dataType: &jsonp&,
itemId: b,
ts: new Date().getTime(),
callback: &?&
miniCartReload();
// 刷新购物车内容
function miniCartReload() {
var c = d(&totalProdQty&);
if (c != null) {
$(&#showTotalQty&).text(c)
var a = &10052&;
var e = sn.catalogId;
var b = httpType+&://& + sn.domain + sn.context + &/MiniCartSearchView?catalogId=& + e + &&storeId=& + a + &&callback=?&;
url: b, cache: false, dataType: &jsonp&, jsonp: &callback&, success: function (h) {
$(&#snCarlist&).html(h);
var g = /&em id=&totalProductQty&&(\d+)&\/em&/;
var f = 0;
if (g.test(h)) {
f = g.exec(h)[1]
$(&#snCarlist&).find(&.mycarDel&).each(function (j) {
var i = $(this);
var k = i.attr(&exdata&);
var l = k.split(&,&);
i.click(function () {
miniCart_deleteOrderItem(l[0]);
return false
$(&#showTotalQty&).text(f);
//listenMiniCart
function listenMiniCart() {
if (isIE6) {
var obj = $(&.g-cart-list-wrapper&);
var _size = obj.find(&ul&).children().size();
if (_size & 4) {
obj.css({height: 328});
obj.css({height: &auto&});
//openCart
var oldNum = 0;
var openCart = function () {
miniCartInt();
listenMiniCart();
var box = $(&#myCart&);
box.mouseover(function () {
clearTimeout(timer);
timer = setTimeout(function(){
var quantity = d(&totalProdQty&);
if (quantity != oldNum) {
$(&#showTotalQty&).text(quantity);
$(&#loadingId&).show();
invokeMiniCart();
if (quantity == 0) {
oldNum = 0;
$(&#snCarlist&).html('&h3 id=&noGoods& class=&noGoods&&&em&&/em&您的购物车是空的,赶紧选购吧!&/h3&');
box.addClass(&g-min-cart-hover&).find(&#snCarlist&).show();
listenMiniCart();
}).mouseleave(function () {
clearTimeout(timer);
timer = setTimeout(function(){
box.removeClass(&g-min-cart-hover&).find(&#snCarlist&).hide();
// 全部分类展开
var next =
var trail = function () {
var dataReady =
var category = $('#category');
var subCategory = $('#subCategory');
var hook = $(&.all-hook&);
var icon = $(&#allSort_drop_icon&);
var isHome = category.is(&:visible&);
var firstMoveIn =
// 加载三级分类数据
//if(category.size()&0){
// $.getScript(&/emall/threeSort__.html&, function(){
//$.getScript(&allCategory.js&, function(){
dataReady =
var showSubMenu = function(index){
var target = &&;
if (isHome) {
target = ' target=&_blank& ';
//if( !dataReady && typeof publicCategoryOpenData!=&undefined& &&
typeof publicCategoryOpenData[index]!=&undefined&){
//$('#subCategory').html(&publicCategoryOpenData=&);
if (!isHome) {
category.hide();
icon.show();
// 非首页展开二级分类
hook.hover(function () {
clearTimeout(timer);
timer = setTimeout(function () {
category.show();
subCategory.hide();
category.children().removeClass(&hover&);
}, function () {
clearTimeout(timer);
timer = setTimeout(function () {
category.hide();
subCategory.hide();
category.children().removeClass(&hover&);
category.hover(function () {
clearTimeout(timer);
}, function () {
timer = setTimeout(function () {
category.hide();
subCategory.hide();
category.children().removeClass(&hover&);
subCategory.hide();
subCategory.hover(function () {
clearTimeout(timer);
}, function () {
timer = setTimeout(function () {
category.hide();
category.children().removeClass(&hover&);
subCategory.hide();
icon.hide();
category.hover(function () {
clearTimeout(timer);
}, function () {
timer = setTimeout(function () {
subCategory.hide();
category.children().removeClass(&hover&);
subCategory.hover(function () {
clearTimeout(timer);
}, function () {
clearTimeout(timer);
timer = setTimeout(function () {
subCategory.hide();
category.children().removeClass(&hover&);
category.find(&dl&).mouseover(function () {
var _this = $(this);
var index = _this.index();
if(isIE6()){
index -= 1;
var dl = category.children(&dl&);
clearTimeout(timer);
timer = setTimeout(function(){
showSubMenu(index);
dl.removeClass(&hover&).eq(index).addClass(&hover&);
}).mouseleave(function(){
clearTimeout(timer);
subCategory.delegate(&.close&, &click&, function () {
subCategory.hide();
function com(d1, d2, d3, d4) {
var a1 = rotation(d1, d2);
var a2 = rotation(d1, d3);
var a3 = rotation(d1, d4);
if (a1 & a2) {
if (a3 &= a1 && a3 &= a2) {
return true
if (a3 &= a2 && a3 &= a1) {
return true
function rotation(d1, d2) {
return Math.atan2(d2[1] - d1[1], d2[0] - d1[0]) * 180 / Math.PI;
// 工具条方法打包
var toolBarEvent = function(){
toolBarWelcome();
toolBarOpen();
setCityUrl();
//绑定二级目录点击替换cityId
//setSearchCity(&#category a&);
// 搜索框方法打包
var searchEvent = function(){
getSearchKeyword();
searchInputEvent();
searchAutoComplete();
// 导航条方法打包
var mainNavEvent = function(){
openCart();
// 回到顶部
var gotop = function(){
$(&html,body&).scrollTop(0);
var floatBar = function () {
//默认参数
var _d = {
contents: null,
//滚动条的内容,可以是DOM字符或者jQuery对象
align: &right&,
//水平方向对齐
vertical: &middle&,
//垂直方向对齐
zIndex: 7500,
css: null,
//附加样式
//包裹容器的id,必要时可以设置id用来操作DOM
ieFixed: true
//IE6及更低版本是否模拟fixed效果
//检测某些垃圾浏览器版本,并保存至变量
var _ie = ($.browser.msie) ? parseInt($.browser.version) :
//检测并合并传递的参数
if (arguments.length & 1 || !(arguments[0] instanceof Object)) {
return $.error(&ECode.floatBar: 参数必须为JSON对象&);
$.extend(_d, arguments[0]);
var _hideCss = {
position: &fixed&,
top: &-9999em&,
left: &-9999em&
if (_ie && _ie &= 6) {
_hideCss.position = &absolute&;
$('&div class=&ECode-floatBar&&&/div&').css(_hideCss).appendTo(&body&);
//修正位置
var _bar = $(&body&).find(&.ECode-floatBar:last&);
_bar.append(_d.contents);
var _bw = _bar.width(),
_bh = _bar.height(),
_css = {zIndex: _d.zIndex};
if (_d.id != null) {
_bar.attr(&id&, _d.id);
switch (_d.align) {
case 'right':
_css.left = 'auto';
_css.right = 0;
case 'left':
_css.right = 'auto';
_css.left = 0;
case 'center':
_css.right = 'auto';
_css.left = '50%';
_css.marginLeft = -_bw / 2;
switch (_d.vertical) {
case 'top':
_css.top = 0;
case 'bottom':
_css.top = 'auto';
_css.bottom = 0;
case 'middle':
_css.top = '50%';
_css.marginTop = -_bh / 2;
if (_ie && _ie &= 6) {
_css.marginTop = 0;
_bar.css($.extend(_css, _d.css));
* 以下代码针对IE6及更古老的版本
* 如果感觉不爽,可以将 _d.ieFixed 置为 false
* 那么IE6下将不会随屏滚动,囧~~
var fixIE6 = function () {
var _topHide = $(document).scrollTop(),
//页面上部被卷去高度
_winHeight = $(window).height(),
//可视区域高度
_winWidth = $(document).width();
//可视区域宽度
switch (_d.vertical) {
case 'top':
_bar.stop().animate({top: _topHide});
case 'bottom':
var _newTop = _winHeight + _topHide - _
if (_d.css.marginBottom != null) {
var _mb = parseInt(_d.css.marginBottom);
//若果IE6下出现 margin-bottom 为负值,则忽略掉,否则合并计算得出 top 值
if (_mb &= 0) {
_newTop -= _
_bar.css({marginTop: 0}).stop().animate({top: _newTop});
case 'middle':
_bar.stop().animate({top: _winHeight / 2 + _topHide - _bh / 2});
if (_d.ieFixed && _ie && _ie &= 6) {
$(window).scroll(function () {
$(window).resize(function () {
//返回方法供页面使用
logonurl : logonurl,
setSearchCity : setSearchCity,
replaceCityParam : replaceCityParam,
replaceCityPlaceHolder : replaceCityPlaceHolder,
registerurl : registerurl,
logoff : logoff,
onlineService : onlineService,
toolBarEvent: toolBarEvent,
searchEvent: searchEvent,
onSubmitSearch : onSubmitSearch,
mainNavEvent : mainNavEvent,
floatBar: floatBar,
gotop : gotop
})(jQuery);
SFE.linzj = (function ($) {
var trail = function () {
var category = $('#category');
$.getScript(&/emall/threeSort__.html&, function(){
//$.getScript(&allCategory.js&, function(){
//alert(&adfsfsa&);
//alert(&aa=& + publicCategoryOpenData);
category.find(&dl&).mouseover(function () {
$('#subCategory').html(&afafa=&);
var go = function() {
})(jQuery);
function hrefLink(e) {
if (navigator.userAgent.indexOf(&Firefox&) & 0) {
window.location = e
var f = document.createElement(&a&);
document.body.appendChild(f);
if (/msie/i.test(navigator.userAgent.toLowerCase())) {
var d = document.createEvent(&MouseEvent&);
d.initEvent(&click&, false, false);
f.dispatchEvent(d)
function d(b) {
return (a = document.cookie.match(RegExp(&(^| )& + b + &=([^;]*)(;|$)&))) ? decodeURIComponent(a[2]
.replace(/\+/g, &%20&))
$(function () {
// 头部方法
//SFE.base.toolBarEvent();
//SFE.base.searchEvent();
//SFE.base.mainNavEvent();
SFE.linzj.go();
// 通用懒加载
//$(&img[src2]&).Jlazyload({type: &image&, placeholderClass: &err-product&});
//通用cityId替换
SFE.base.setSearchCity(&.cityId_replace a&);
SFE.base.floatBar({zIndex:11000, contents : $(&#snSideTools&),align :&right&,vertical:&bottom&,css:{&right&:60,marginBottom:200}});//左悬浮
$(window).scroll(function(){
var topHide = $(document).scrollTop(); //页面上部被卷去高度
var gotop = $(&#gotop&);
if(topHide&20){
gotop.show();
gotop.hide();
SFE.base.trail().showSubMenu(0);
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:127823次
积分:1922
积分:1922
排名:第14943名
原创:59篇
评论:18条
(8)(5)(2)(2)(4)(2)(20)(12)(7)(1)(4)(2)

我要回帖

更多关于 jquery获取属性值 的文章

 

随机推荐