国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
931B

  1. var atlasimg = 0;
  2. function addImage(src, pid) {
  3. var newImgDiv = document.createElement("div");
  4. var delstr = '';
  5. atlasimg++;
  6. if (pid != 0) {
  7. atlasimg = 'ok' + pid;
  8. delstr = '<div class="atlas-box"><a href="javascript:delAlbPic(' + pid + ')" class="btn btn-danger btn-sm">删除</a></p>';
  9. } else {
  10. atlasimg = 'err' + atlasimg;
  11. }
  12. newImgDiv.className = 'atlas';
  13. newImgDiv.id = 'atlas' + atlasimg;
  14. document.getElementById("gallery").appendChild(newImgDiv);
  15. newImgDiv.innerHTML = '<div class="atlas-head"><img src="' + src + '"></div>' + delstr;
  16. if (typeof arctype != 'undefined' && arctype == 'article') {
  17. if (pid != 0) {
  18. newImgDiv.innerHTML = '<div class="atlas-head"><img src="' + src + '" onClick="addtoEdit(' + pid + ')"></div>' + delstr;
  19. }
  20. }
  21. newImgDiv.innerHTML += '<div class="atlas-foot"><input type="text" name="picinfo' + atlasimg+ '" class="atlas-input" placeholder="请输入图片注释"></div>';
  22. }