Home > Backend Development > PHP Tutorial > php筛选问题,求思路,求指导

php筛选问题,求思路,求指导

WBOY
Release: 2016-06-23 14:08:40
Original
793 people have browsed it

nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



jquery标签筛选联动选中 - 牛图库素材网

<script></script>











    
    
    

        
分类:

        裤子1 
        
帽子
 
        
衣服
 
        
鞋子
 
        
手机
 
    


    

        
价格:

        
10-100块

        
100以上

    


    

        
品牌:

        
帅气

        
英俊

        
潇洒

        
妈妈织

    


您已选择:
if(isset($_GET['id']))
{

$id=$_GET['id'];

echo $id;
if($id=='aa')
{
echo "裤子";
}
else
{
echo "不是裤子";
}

}

?>
    

    <script> <br /> $(document).ready(function () { <br /> $(".divSmall").click(function () { <br /> var isAlreadyHave = false; <br /> var thisID = $(this).attr("id"); <br /> var classType = $(this).attr("rel") <br /> $(".divSmall2").each(function () { <br /> if ($(this).attr("rel") == thisID) { <br /> isAlreadyHave = true; <br /> } <br /> if ($(this).attr("ttype") == classType) { <br /> goBegin($(this).attr("rel")); <br /> $(this).remove(); <br /> } <br /> }); <br /> if (!isAlreadyHave) { <br /> $(this).css("background-color", "#FFA500"); <br /> writeDiv($(this).html(), $(this).attr("id"), $(this).attr("rel")); <br /> } <br /> }); <br /> $(".image").live('click', function () { <br /> goBegin($(this).parent().attr("rel")); <br /> $(this).parent().remove(); <br /> }); <br /> }); <br /> //输出一个div <br /> function writeDiv(name, id, classONE) { <br /> // var divShow = "<div class='divSmall2' id='"+id+"' href='"+href+"' rel='" + id + "' ttype='"+ classONE+"'>" + name + "<img src='image/close.gif' class='image' / alt="php筛选问题,求思路,求指导" ></script>
";
   
var divShow = "" + name + "php筛选问题,求思路,求指导";
            $("#mainSelect").html($("#mainSelect").html() + divShow);
        }
        function goBegin(ID) {
            $("#" + ID).css("background-color", "#FFFFFF");
        }
    








回复讨论(解决方案)


我在网上找的素材,为什么那个id传过来判断不正确啊?我是新手才学着做尼。。很笨的别骂我,给的提示思路就好。。

裤子1 
改为
裤子1 

唉。我太大意了,,看见了。。。谢谢我调调,

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template