图片展示组件JS调用
BSL.ShowImages('urls','titles','orientation')
参数 | 必填 | 说明 |
---|---|---|
urls | 是 | 图片网络地址。 |
titles | 是 | 图片标题 |
orientation | 是 | 固定值,控制显示方向。 |
orientation值
编码 | 说明 |
---|---|
1 | 竖屏 |
2 | 横屏 |
3 | 随屏 |
<script type="text/javascript> function imgs(){ var datas = new Array(); datas[0] = "https://www.xxxx.com/public/deal_file/57/logo.png"; datas[1] = "https://www.xxxx.com/public/deal_file/70/logo.png"; datas[2] = "https://www.xxxx.com/public/deal_file/71/logo.png"; datas[3] = "https://www.xxxx.com/public/deal_file/72/logo.png"; var titles = new Array(); titles[0] = "高级"; titles[1] = "中级"; titles[2] = "初级"; titles[3] = "基础"; BSL.ShowImages(datas,titles,3); } </script> <a href="#" onclick="imgs()">查看图片</a>
class标签:bslImgClick
对应要展示图片class增加上标签。
例
<img src="http://www.appbsl.cn/demo/img/img1.png" class="bslImgClick"> <img src="http://www.appbsl.cn/demo/img/img2.png" class="bslImgClick"> <img src="http://www.appbsl.cn/demo/img/img3.png" class="bslImgClick"> <img src="http://www.appbsl.cn/demo/img/img4.png" class="bslImgClick">