Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/386.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript HTML-保留用户填写的字段,并在“提交”时显示在下一页_Javascript_Html - Fatal编程技术网

Javascript HTML-保留用户填写的字段,并在“提交”时显示在下一页

Javascript HTML-保留用户填写的字段,并在“提交”时显示在下一页,javascript,html,Javascript,Html,我有一个真正的基本html订单,要求提供姓名、地址、信用卡信息、账单/发货信息。这是我的html的一个示例 个人资料: 名字 姓氏: 帐单地址 街道地址: 城市、州、邮编: 如果发货地址和账单地址相同,请选中此框。 送货地址 街道地址: 城市、州、邮编: 创建用于打印的脚本 <script type="text/javascript"> function PrintDiv() { $('document').ready(function

我有一个真正的基本html订单,要求提供姓名、地址、信用卡信息、账单/发货信息。这是我的html的一个示例

个人资料: 名字 姓氏: 帐单地址 街道地址: 城市、州、邮编: 如果发货地址和账单地址相同,请选中此框。 送货地址 街道地址: 城市、州、邮编:
创建用于打印的脚本

 <script type="text/javascript">


        function PrintDiv() {
            $('document').ready(function () {


                var divContents = document.getElementById("WOcontainer").innerHTML;
                var printWindow = window.open('', '', 'height=800,width=1024');
                printWindow.document.write('<html><head><title>Personal Information</title>');
                printWindow.document.write('</head><body style=" font-family: Arial; font-size: 10px;" >');
                printWindow.document.write(divContents); 
                printWindow.document.write('</body> </html>');
                printWindow.document.close();
                printWindow.print();
            })
        }


    </script>
事件处理程序

<input id="Button1" type="button" value="button" onclick="PrintDiv();" />