$(function () { var text = ""; var keywords = ""; GetInsuranceProlist(keywords, text); $("#InsuranceProBtn2").click(function () { keywords = $.trim($("#InsuranceProInput2").val()).replace(/[<>&"]/g, function (c) { return { '<': '<', '>': '>', '&': '&', '"': '"', '"': '"', "'": '′', "'": '′' }[c]; }); if (keywords == "产品名称") { keywords = ""; } GetInsuranceProlist(keywords, text); }); $("#InsuranceProInput2").unbind("focus").focus(function () { $("#InsuranceProInput2").val("").css("color", "black"); }); $('.condition:first li:not(first-child)').click(function () { $(this).addClass('active'); $(this).siblings().removeClass('active') var html = $(this).html(); if (html == "人寿险") { $("#ul3").html("
  • 不限
  • 定期寿险
  • 两全保险
  • 终身寿险
  • "); } else if (html == "健康险") { $("#ul3").html("
  • 不限
  • 定期重疾险
  • 医疗费用补偿险
  • 终身重疾险
  • 住院费用补贴险
  • "); } else if (html == "意外险") { $("#ul3").html("
  • 不限
  • 交通意外险
  • 旅行意外险
  • 人身意外伤害险
  • "); } else if (html == "投资型保险") { $("#ul3").html("
  • 不限
  • 分红保险
  • 投资连结险
  • 万能保险
  • "); } else { $("#ul3").html("
  • 不限
  • 定期寿险
  • 两全保险
  • 终身寿险
  • 定期重疾险
  • 医疗费用补偿险
  • 终身重疾险
  • 住院费用补贴险
  • 交通意外险
  • 旅行意外险
  • 人身意外伤害险
  • 分红保险
  • 投资连结险
  • 万能保险
  • "); } $('.condition:last li:not(first-child)').on("click", function () { $(this).addClass('active'); $(this).siblings().removeClass('active'); text = $(this).html(); if (text == "不限") { text = ""; } GetInsuranceProlist(keywords, text); }) }) $('.condition:first li:first-child').click(function () { $(this).addClass('active').siblings().removeClass('active'); GetInsuranceProlist(keywords, ""); }) $('.condition:last li:not(first-child)').click(function () { $(this).addClass('active'); $(this).siblings().removeClass('active'); debugger; text = $(this).html(); if (text == "不限") { text = ""; } GetInsuranceProlist(keywords,text); }) $('.condition:last li:first-child').click(function () { $(this).addClass('active').siblings().removeClass('active'); GetInsuranceProlist(keywords,""); }) }); function GetInsuranceProlist(keywords, kind) { pageHelper.Init({ url: "/Teacher/InsurancePro/GetInsuranceProlist", type: "POST", pageDiv: "#pages", data: { keywords: keywords, kind: kind }, bind: function (data) { var html = ""; if (data.Data.length > 0) { $(data.Data).each(function (index, dom) { //每行html var trHtml = ""; trHtml += ""; //拼接tbody html += StringHelper.FormatStr(trHtml, dom.Name, dom.Features, dom.Id ); }); } else { html = "