<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ />
<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
<?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 = “
“;
var divShow = “” + name + “”;
$(“#mainSelect”).html($(“#mainSelect”).html() + divShow);
}
function goBegin(ID) {
$(“#” + ID).css(“background-color”, “#FFFFFF”);
}
</script>
回复讨论(解决方案)
我在网上找的素材,为什么那个id传过来判断不正确啊?我是新手才学着做尼。。很笨的别骂我,给的提示思路就好。。
裤子1
改为
裤子1
唉。我太大意了,,看见了。。。谢谢我调调,