标签:
html
<ul id="adul"> <li class="RMB_FIRST" onclick="setLogoType('empty')"> <img src="{{ asset('images/Wu.png')}}" alt="" /> <p>无图标</p> <img src="{{ asset('images/click.png')}}" alt="" class="RMB_FT" style="display:block" /> </li> <li onclick="setLogoType('default_1')"> <img src="{{ asset('qrcodes/default/logoWeChat.png')}}" alt="" class="RMB_ZT" /> <img src="{{ asset('images/hover.png')}}" alt="" class="RMB_FT" /> </li> <li onclick="setLogoType('default_2')"> <img src="{{ asset('qrcodes/default/logoMicroBlog.png')}}" alt="" class="RMB_ZT" /> <img src="{{ asset('images/hover.png')}}" alt="" class="RMB_FT" /> </li> <li class="RMB_LAST" onclick="setLogoType('file')"> <img src="{{ asset('images/UP.png')}}" alt="" /> <p>本地上传</p> <input type="file" name="file_img" class="RMB_FILE" /> <input type="hidden" id="logo_type" name="logo_type" class="RMB_FILE" /> </li> </ul>
ajax + jquery
var liLenth = $("#adul li").length; if(liLenth == 4){ var msg = "<li><img src="+returndata.path+" alt='' class'RMB_ZT' style='width:70px;height:70px;'/></li>"; $('#adul li').eq(2).after(msg); }else{ var msg = "<li><img src="+returndata.path+" alt='' class'RMB_ZT' style='width:70px;height:70px;'/></li>"; $('#adul li').eq(3).append(msg); }
标签:
原文地址:http://blog.csdn.net/a9925/article/details/51361359