- function uploadImgFile(id){
- window.open("${base}/ajax/picupload.action?parentImgUrlId="+id,"","height=300, width=500, toolbar =no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
- //document.getElementById(id).value = someValue;
- }
- function testfun(aaa){
- alert("111+"+aaa);
- function setParentImgUrl(){
- window.opener.testfun('aaaaa');
- //window.opener.document.getElementById("${parentImgUrlId}").value = document.getElementById('img_url').value;
- window.close();
- }
资料来源:
http://jxdwuao.iteye.com/blog/793234
本文介绍了一个使用JavaScript实现的文件上传功能,通过打开新窗口进行图片选择,并提供了设置父窗口图片URL的方法。该方法利用了window.open及window.opener特性。

814

被折叠的 条评论
为什么被折叠?



