脚本宝典收集整理的这篇文章主要介绍了thinkphp里模版文件js无法使用if condition的问题,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
/**
* @example thinkPHP里模版文件js无法使用if condITion的问题
* @example 参考地址:https://segmentfault.COM/q/1010000008729571
* @example 主要代码:(item.is_show == 1?‘<i>待报价</i>‘:‘<abbr>已报价</abbr>‘)+
*/@H_126_9@
$("#promotionresult").empty(); VAR htML = ""; $.each(data.data,function(i,item) { html+=‘<dl class="MyOrderM">‘+ ‘<dd>‘+ ‘<p>‘+ ‘<span>‘+‘舒朋士-‘+item.username+‘</span>‘+ ‘<em>‘+ item.phone + ‘</em>‘+ (item.is_show == 1?‘<i>待报价</i>‘:‘<abbr>已报价</abbr>‘)+ ‘</p>‘+ ‘<p>‘ + item.discribe + ‘</p>‘+ ‘</dd>‘+ ‘<span>详情</span>‘+ ‘</dl>‘; }) $("#PRomotionresult").html(html);
以上是脚本宝典为你收集整理的thinkphp里模版文件js无法使用if condition的问题全部内容,希望文章能够帮你解决thinkphp里模版文件js无法使用if condition的问题所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。