我有一个菜鸟问题 - 我创建了一个非常简单的 HTML 页面,当按下按钮时,通过我的网络将一串串行数据发送到以太网到串行转换器。这控制音频矩阵开关(通过其串行端口)。该网页可以工作并且它会切换音频矩阵,但是在我单击一个按钮后,浏览器会无限期地等待响应。我可以单击其他按钮并仍然进行切换,但它总是在等待响应。如何从该远程设备获取响应并在网页上显示(或对其进行操作),并防止页面无限期等待?这是将此数据字符串发送到远程 IP 的正确方法,还是有更好的方法?这是代码:
<html>
<head>
</head>
<body bgcolor="#808080">
<div align="center">
<p><font size="7" face="Arial" color="#FFFFFF">Audio Control</font></p>
<div
<div style="width:500px;height:175px;border:1px solid white;">
<p align="left"><font size="6" face="Arial" color="#FFFFFF">Backyard</font></p><hr>
<form action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Tuner" id="Backyard Tuner" name="CL1I1O1T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<form action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Computer" id="Backyard Computer" name="CL1I2O1T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<form action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Apple TV" id="Backyard Apple TV" name="CL1I3O1T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<form action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="iPod" id="Backyard iPod" name="CL1I4O1T" class="auto- style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Off" id="Backyard Off" name="DL1O1T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<p align="left"> </p>
<p align="left"> </p>
<p align="left"> </p>
<div
<div style="width:500px;height:175px;border:1px solid white;">
<p align="left"><font size="6" face="Arial" color="#FFFFFF">Garage</font></p><hr>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Tuner" id="Garage Tuner" name="CL1I1O2T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Computer" id="Garage Computer" name="CL1I2O2T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Apple TV" id="Garage Apple TV" name="CL1I3O2T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="iPod" id="Garage iPod" name="CL1I4O2T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Off" id="Garage Off" name="DL1O2T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<div align="center">
<p align="left"> </p>
<p align="left"> </p>
<p align="left"> </p>
<div
<div style="width:500px;height:175px;border:1px solid white;">
<p align="left"><font size="6" face="Arial" color="#FFFFFF">Family Room</font></p><hr>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Tuner" id="Family Room Tuner" name="CL1I1O3T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Computer" id="Family Room Computer" name="CL1I2O3T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Apple TV" id="Family Room Apple TV" name="CL1I3O3T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="iPod" id="Family Room iPod" name="CL1I4O3T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Off" id="Family Room Off" name="DL1O3T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<div align="center">
<p align="left"> </p>
<p align="left"> </p>
<p align="left"> </p>
<div
<div style="width:500px;height:175px;border:1px solid white;">
<p align="left"><font size="6" face="Arial" color="#FFFFFF">Basement Family Room</font> </p><hr>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Tuner" id="Basement Tuner" name="CL1I1O4T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Computer" id="Basement Computer" name="CL1I2O4T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Apple TV" id="Basement Apple TV" name="CL1I3O4T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="iPod" id="Basement iPod" name="CL1I4O4T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
<action="http://192.168.5.30:100" method="POST" >
<font face="Arial">
<input type="submit" value="Off" id="Basement Off" name="DL1O4T" class="auto-style1" style="float: left" /><span class="auto-style1">
</span>
</font>
</form>
</body>
</html>