ClN------2021⚪
点击图片显示该图片的详细信息(前端)
Jquery选择器
js代码
$(document).ready(function() {
/**
* 查看功能,跳转页面,html形式显示工作记录
* @auth ClN
*/
$("a[name='a_logo']").click(function(){
console.log("data:"+$(this).attr("comName"))
$("#dlg_cominfo").dialog("setTitle","企业信息");
$("#dlg_cominfo").dialog("open");
$("#info_comName").html($(this).attr("comName"));
$("#info_industry").html($(this).attr("industry"));
$("#info_comcontacts").html($(this).attr("comcontacts"));
$("#info_phone").html($(this).attr("phone"));
$("#info_comAddress").html($(this).attr("comAddress"));
});
})
js代码
"<a href='#' name='a_logo' comName='"+item.company.comName+"' industry='"+item.company.industry+"' comcontacts='"+item.company.comcontacts+"' phone='"+item.company.phone+"' comAddress='"+item.company.comAddress+"' >"
easyui html
-
<div id="dlg_cominfo" class="easyui-dialog" data-options="resizable:false,closed:true"> <table border="1" style="width: 550px;height:250px; border:2px #E0ECFF solid; border-collapse:collapse; text-align:center; "> <tr height="40"> <td style="background-color: #f0f0f0;width:50px;">单位名称:</td> <td style="width:100px;background-color: #FAFAFA;" id = "info_comName"></td> <td style="background-color: #f0f0f0;width:50px;">所属行业:</td> <td style="width:100px;background-color: #FAFAFA;" id = "info_industry"></td> </tr> <tr height="40"> <td style="background-color: #f0f0f0;width:50px;">联系人:</td> <td style="width:100px;background-color: #FAFAFA;" id = "info_comcontacts"></td> <td style="background-color: #f0f0f0;width:50px;">联系方式:</td> <td style="width:100px;background-color: #FAFAFA;" id = "info_phone"></td> </tr> <tr height="40"> <td style="background-color: #f0f0f0;width:50px;">企业地址:</td> <td colspan="3" style="width:200px;background-color: #FAFAFA;" id = "info_comAddress"></td> </tr> </table> </div>