多个微擎模板组tpl_form_field_image设置图片

微擎模板组tpl_form_field_image设置图片
使用微擎模板组:
{php echo tpl_form_field_image(‘single-image’);}
图片框赋值:
KaTeX parse error: Expected '}', got 'EOF' at end of input: …eng1']").val("{confs[‘huandeng1’]}")
单个图片框展示:
$_W[‘attachurl’] --------->附件URL目录,如果开启远程附件后,此值是远程附件地址
$(".img-responsive").attr(“src”,"{php echo KaTeX parse error: Expected 'EOF', got '}' at position 16: _W['attachurl']}̲{confs[‘huandeng2’]}");
多个图片框展示:
var index=0;
var myArray=new Array();
$(".form-control").each(function(){

      if(index!=0 && index!=6){
        
         myArray.push($(this).val());
         }
      index++;

	 });      
  	var x=0;
  	$(".img-responsive").each(function(){
	 $(this).attr("src","{php echo $_W['attachurl'];}"+myArray[x]);
     	 x++;

		});

微擎创建路由:
$this->createWebUrl(‘view’)

发布了5 篇原创文章 · 获赞 0 · 访问量 154

猜你喜欢

转载自blog.csdn.net/aotebiaoge/article/details/104031929