js打开新窗口并写入内容

xiaoxiao2021-02-28  51

1.

    var newwindow=window.open();     newwindow.document.write('<html><title>预览</title>');     newwindow.document.write('<body>');     newwindow.document.write('11111');     newwindow.document.write('</body></html>');

2.(仅IE支持)

    var newwindow=window.open();

    newwindow.document.forms[0].elements[0].value="11qqqqq";

3.

    var newwindow=window.open();

    newwindow.document.getElementById("id");

转载请注明原文地址: https://www.6miu.com/read-75990.html

最新回复(0)