|
主要代码如下:
- function showPicAndAddToFile(path) {
- //path = path.replace(/[\r\n]/g, '');
- alert(path);//alert(_URL.createObjectURL(path));
- var html = '', fileNum = 1;
- html += '<div class="addFile">';
- html += '<div class="toolBar">';
- html += '<span><img idx="' + fileNum + '" fileid="" class="deleteImgBtn" src="/style_1/img/del_img.gif" /></span></div>';
- html += '<img width="80" height="80" class="file" id="imgaaa" src="' + path + '" />';
- html += '</div>';
- alert(document.getElementById('imgaaa').getAttribute('src'));
- }
复制代码 |
|