简单实例1:

html部分:

 <img style="width:100%;height:100%" src="__ROOT__/Public/Uploads/VehiclePic/{$driverVehicle['vehiclePic'][0]['picName']}" onclick="openImages(this)">

js部分:

function openImages(object){
$("#vehicleOpendBox").show();
$("#vehicleOpendBox").find("img").attr("src",$(object).attr("src"));

 $(object).addClass("on");

}

简单实例2:

html部分:

<div class="TabADS bor_b clearboth relative ">
<ul>
<li class="TasADSOn Driver_Menu" onclick="openListBox(this,1)" >车辆信息</li>
<li class="Driver_Menu" onclick="openListBox(this,2)">收到的评价</li>
</ul>
</div>

js部分:

function openListBox(object,number){
$(".Driver_Menu").removeClass("TasADSOn");
$(object).addClass("TasADSOn");
if(number==1){
$("#Vehicle_List_Box").show();
$("#pingjiabox").hide();
}else{
$("#Vehicle_List_Box").hide();
$("#pingjiabox").show();
}
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2021-12-09
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-12-09
相关资源
相似解决方案