利用输出的HTML就可以与服务端通信,如:document.write("<img src="imageURL">这样就可以显示一张图片在网页中了!

解决方案 »

  1.   

    表单发送,target指向隐藏的iframe
      

  2.   

    象这样:
    <html>
    <head>
    </head>
    <body>
    <iframe name="iframe1" width=0 height=0></iframe>
    <form name=from1 target=iframe1 action="服务器端程序地址">
    <input type=hidden name=param1 value="value1">
    <input type=hidden name=param2 value="value2">
    <input type=submit value="提交">
    </form>
    </body>
    </html>
      

  3.   

    更懒的办法是这样:<html>
    <head>
    </head>
    <body>
    <iframe name="iframe1" width=0 height=0></iframe>
    <button onclick="document.all('iframe1').src='服务器端程序地址?param1=value1&param2=value2'">提交</button>
    </body>
    </html>前面孟夫子说的http大概就是这个意思了吧?