• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

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

php 搞代码 4年前 (2022-01-23) 17次浏览 已收录 0个评论
文章目录[隐藏]

<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ />
jquery标签筛选联动选中 – 牛图库素材网
<link href=”css/css.css” type=”text/css” rel=”Styleshee来@源gao*daima.com搞@代#码网搞gaodaima代码t” />
<script type=”text/javascript” src=”js/jquery.min.js”></script>

<body>

分类:

裤子1

帽子

衣服

鞋子

手机

价格:

10-100块

100以上

品牌:

帅气

英俊

潇洒

妈妈织

您已选择:
<?php
if(isset($_GET[‘id’]))
{

$id=$_GET[‘id’];

echo $id;
if($id==’aa’)
{
echo “裤子”;
}
else
{
echo “不是裤子”;
}

}

?>

<script type=”text/javascript”>
$(document).ready(function () {
$(“.divSmall”).click(function () {
var isAlreadyHave = false;
var thisID = $(this).attr(“id”);
var classType = $(this).attr(“rel”)
$(“.divSmall2”).each(function () {
if ($(this).attr(“rel”) == thisID) {
isAlreadyHave = true;
}
if ($(this).attr(“ttype”) == classType) {
goBegin($(this).attr(“rel”));
$(this).remove();
}
});
if (!isAlreadyHave) {
$(this).css(“background-color”, “#FFA500”);
writeDiv($(this).html(), $(this).attr(“id”), $(this).attr(“rel”));
}
});
$(“.image”).live(‘click’, function () {
goBegin($(this).parent().attr(“rel”));
$(this).parent().remove();
});
});
//输出一个div
function writeDiv(name, id, classONE) {
// var divShow = “

” + name + “

“;

var divShow = “” + name + “”;
$(“#mainSelect”).html($(“#mainSelect”).html() + divShow);
}
function goBegin(ID) {
$(“#” + ID).css(“background-color”, “#FFFFFF”);
}
</script>

回复讨论(解决方案)

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

裤子1
改为
裤子1

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


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:php筛选问题,求思路,求指导

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址