Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.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 试图获取以google条形码字体返回的表单输入_Javascript_Html_Forms_Fonts - Fatal编程技术网

Javascript 试图获取以google条形码字体返回的表单输入

Javascript 试图获取以google条形码字体返回的表单输入,javascript,html,forms,fonts,Javascript,Html,Forms,Fonts,我正在使用下面的代码示例,并尝试使用google条形码字体获取返回的结果弹出窗口:barcode 39 Extended 我不知道如何对其进行编码,因此生成的脚本弹出窗口使用该字体显示结果 <html> <head> <title>Form to Barcode Example</title> </head> <script LANGUAGE="JavaScript" type="text/jav

我正在使用下面的代码示例,并尝试使用google条形码字体获取返回的结果弹出窗口:barcode 39 Extended

我不知道如何对其进行编码,因此生成的脚本弹出窗口使用该字体显示结果

<html>
<head>
<title>Form to Barcode Example</title>

</head>

<script LANGUAGE="JavaScript" type="text/javascript">
function display() {
  DispWin = window.open('','NewWin', 'toolbar=no,status=no,width=300,height=200')
  message = "<ul><li><b>NAME: </b>" + document.form1.yourname.value;
  message += "<li><b>ADDRESS: </b>" + document.form1.address.value;
  message += "<li><b>PHONE: </b>" + document.form1.phone.value + "</ul>";
  DispWin.document.write(message);
}
</script>
</head>
<body>
<span style="font-family: Arial; font-weight: normal; font-style: normal; text-decoration: none; font-size: 14pt;"><h1>Form Example</h1>
Enter the following information. When you press the Display button,
the data you entered will be displayed in a pop-up window showing the barcoded results.
<form name="form1">
<p><b>Name:</b> <input TYPE="TEXT" SIZE="20" NAME="yourname">
</p>
<p><b>Address:</b> <input TYPE="TEXT" SIZE="30" NAME="address">
</p>
<p><b>Phone: </b> <input TYPE="TEXT" SIZE="15" NAME="phone">
</p>
<p><input TYPE="BUTTON" VALUE="Display" onClick="display();"></p>
</form></span>
</body>
</html>

表格到条形码示例
函数显示(){
DispWin=window.open(“”,'NewWin','toolbar=no,status=no,width=300,height=200')
message=“
  • NAME:”+document.form1.yourname.value; 消息+=”
  • 地址:“+document.form1.ADDRESS.value; message+=“
  • 电话:“+document.form1.PHONE.value+”
”; DispWin.document.write(消息); } 范例 输入以下信息。当您按下显示按钮时, 您输入的数据将显示在显示条形码结果的弹出窗口中。 姓名:

地址:

电话:


为什么要打开新窗口?