本帖最后由 airukongqi4321 于 2013-11-03 11:44:21 编辑

解决方案 »

  1.   

    这个之前有人问过
    两种方案:
    1是用javascript根据选择的变量组合成一个url,这种方案需要先选择,点击一个按钮后打开网页(操作有点像提交)
    2是php根据每种参数写一个链接,这种方案每点击一个参数就刷新网页,刷新网页时就把参照已经选择的多个条件把所有链接重新计算输出2的变形方案是ajax
      

  2.   

    view-source:http://detail.zol.com.cn/notebook_index/subcate16_0_list_4000_s1227_1_1_0_1.html
    <dt>品牌</dt>
        <dd class="brand-sel-box clearfix">
            <div id="singular" class="brand-list">
                                        <span class="all sel">不限</span>
                            
                        
                                                <a href="/notebook_index/subcate16_160_list_4000_s1227_1_1_0_1.html">联想</a>
                                    <a href="/notebook_index/subcate16_227_list_4000_s1227_1_1_0_1.html">华硕</a>
                                    <a class="null" rel="nofollow" href="/notebook_index/subcate16_21_list_4000_s1227_1_1_0_1.html">戴尔</a>
                                    <a class="null" rel="nofollow" href="/notebook_index/subcate16_223_list_4000_s1227_1_1_0_1.html">惠普</a>
                                    <a href="/notebook_index/subcate16_1191_list_4000_s1227_1_1_0_1.html">神舟</a>
                                    <a class="null" rel="nofollow" href="/notebook_index/subcate16_218_list_4000_s1227_1_1_0_1.html">Acer宏碁</a>
    .....
    <dt>价格</dt>
        <dd class="clearfix">
                            <a href="/notebook_index/subcate16_list_s1227_1.html" class="all">不限</a>
                            
                    <a class="null" rel="nofollow" href="/notebook_index/subcate16_0_list_0_s1227_1_1_0_1.html">1999元以下</a>
                    <a href="/notebook_index/subcate16_0_list_2000_s1227_1_1_0_1.html">2000-2499元</a>
                    <a href="/notebook_index/subcate16_0_list_2500_s1227_1_1_0_1.html">2500-2999元</a>很明显,连接是由服务端产生的view-source:http://price.pcauto.com.cn/price/q-p2-k75.html<div class="getTh">价格:</div>
    <div class="umLimit">
    <a class='' href="/price/q-k75.html">不限</a>
    </div>
    <div class="Items">
    <a class='' href="/price/q-p1-k75.html">5万以下</a><a class=' s' href="/price/q-p2-k75.html">5-8万</a><a class='' href="/price/q-p3-k75.html">8-10万</a><a class='' href="/price/q-p4-k75.html">10-15万</a><a class='' href="/price/q-p5-k75.html">15-20万</a><a class='' href="/price/q-p6-k75.html">20-25万</a>
    ......
    <div class="getTh">级别:</div>
    <div class="umLimit">
    <a class='' href="/price/q-p2.html">不限</a>
    </div>
    <div class="Items">
    <a class=' ' href='/price/q-p2-k76.html'>微型车</a><a class=' ' href='/price/q-p2-k110.html'>小型车</a><a class=' ' href='/price/q-p2-k73.html'>紧凑型车</a><a class=' ' href='/price/q-p2-k72.html'>中型车</a><a class=' null' href='javascript:void(0)'>中大型车</a>
    同样也是如此
      

  3.   

    常用的思路还是后台整合在url里面输出到前台吧。
      

  4.   

    最简单方式ajax  获取数据输出
      

  5.   

    其实问题的关键还是:“怎么通过某一事物的单一属性,判断其他属性是否存在”;如果是 每点一次条件,都会到数据库里取一遍的话,这实现起来不难,比如点了一下“5-8万” 这个条件,最笨的方法无非就是在后台
    select * from auto_detail where et_price >= 50000 and et_price < 80000;
    (假设auto_detail是一个存储了所有厂商的所有车型的详细资料表)返回的结果可能有几百条,再对结果循环一遍,分别一一将返回集里的auto_grade,car_brand....(略);都存入一个二维数组里。那“所有汽车级别,汽车品牌。。”等等这些数据哪来呢?无非再select distinct auto_grade from xxx 而已。
    做好点的话把所有这种供对比的,不必经常更新的数据放缓存里面,就不用每次都去数据库查一遍了。然后就简单了,分别判断一下,auto_grade里那些属性是有的,那些属性是没有的,再返回一个数组给jQuery,控制页面把样式改了就可以了。以上是最笨的做法,权当抛砖引玉
      

  6.   

    这个是专用企业级搜索引擎!查solr, sphix 和lucene!