锘?(function () {
LoadMenu();
footer();
$("#menu-bar .car").bind("click", function () {
window.location.href = "car.html";
});
$.ajax({
url: '/tools_ajax/UserInfo.aspx/IsLogin',
type: "POST",
success: function (res) {
if (res == "1") {
$(".login").hide();
$(".reg").hide();
// strHtml += "
閫€鍑虹櫥褰旤/li>";
load_car_count();
$(".username").show();
}
else {
$(".login").show();
$(".reg").show();
$(".username").hide();
}
},
error: function (res) {
}
});
});
$(window).scroll(function () {
var top = document.documentElement.scrollTop || document.body.scrollTop;
if (top < 40) {
$("#menu-bar").css("display", "none");
}
else {
$("#menu-bar").css("display", "block");
}
});
//鍔犺浇鑿滃崟
function LoadMenu() {
$.ajax({
url: '/tools_ajax/WebSite.aspx/GetMenu',
type: "POST",
success: function (res) {
var strHtml = "";
if (res != null && res != "") {
var list = JSON.parse(res);
for (var i = 0; i < list.length; i++) {
strHtml += "" + list[i].title + "";
}
}
else {
strHtml += "棣栭〉";
}
$(".menu-bar").html(strHtml);
},
error: function (res) {
var strHtml = "";
strHtml += "棣栭〉";
$("#comm_menu").html(strHtml);
}
});
}
//鍔犺浇鑿滃崟璐墿杞﹀垪琛
function load_car_count() {
var allcount = 0;
$.ajax({
url: '/tools_ajax/CarInfo.aspx/CarCount',
type: "POST",
success: function (res) {
$(".carnum").html(res);
},
error: function (res) {
}
});
};
function footer() {
var z = "";
z += "