document.body.innerHTML+="<a href=''>new</a>"

解决方案 »

  1.   

    http://localhost/images/aa.gif 这也行?
      

  2.   

    源代码是这样的 
    function openwin(a,lef,top,wid,hei)
    {
    newWindow = window.open(a,'memberdetail','left='+lef+',top='+top+',width='+wid+',height='+hei+',resizable=0,status=0,menubar=0,scrollbars=1');} 
    openwin('http://localhost/images/1454.gif','5','50','700','250')
      

  3.   

    图像用:
    <script>
    function openwin(a,lef,top,wid,hei)
    {
    newWindow = window.open("",'memberdetail','left='+lef+',top='+top+',width='+wid+',height='+hei+',resizable=0,status=0,menubar=0,scrollbars=1');
    newWindow.document.write("<center><img src="+a+"><br>")
    newWindow.document.write("<a href=javascript:window.close()>close</a>")

    openwin('http://192.168.1.90:8080/admin/images/logo.gif','5','50','700','250')</script>
      

  4.   

    必须是同域的,否则将拒绝访问
    <script>
    function openwin(a,lef,top,wid,hei)
    {
    newWindow = window.open(a,'memberdetail','left='+lef+',top='+top+',width='+wid+',height='+hei+',resizable=0,status=0,menubar=0,scrollbars=1');
    newWindow.document.body.insertAdjacentHTML("beforeEnd","<center><a href=javascript:window.close()>close</a>")

    openwin('about:http://192.168.1.90:8080/','5','50','700','250')</script>
      

  5.   

    怎么样在一个html打开时执行一段javascript代码  ?