<!DOCTYPE html PUBLIC " -//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title> 测试系统集成 </title > </head> <body> <br> <script type="text/javascript" src="js/integration.js"></script> <form method="post" action="/api/DeviceInterface/IntegrationServlet" style="margin-top:8px;margin-bottom:5px" onsubmit="return commit()"> <table style="margin-left: 0px;margin-bottom:5px;margin-top:0px"> width="99%"> <tr> <td width="50%" style="border-style:solid;border-width:1px;border-color:#91D4FF;"> <table align="left" width="50%" align="center" border="0" cellpadding="0" cellspacing="0" > <tr> <td align="left" class="even" nowrap><b>State(Y-Success,N-Wrong): </b>N</td> </tr> <tr> <td align="left" class="even" nowrap><b>Return info: </b><SFDM_ERROR><MESSAGE >用户名或密码错误!</MESSAGE></SFDM_ERROR></td> </tr> </table> </td> </tr> </table> </form> </body> </html> <script type="text/javascript"> //window.onload=function(){try{parent.complete();}catch(e){}}; </script> 如何提取执行时返回的结果
时间: 2023-06-17 12:07:16 浏览: 56
这段代码看起来是一个 HTML 页面,其中包含一个表单,该表单的提交动作是通过 HTTP POST 方法将数据提交到 /api/DeviceInterface/IntegrationServlet 这个 URL 上。在表单的提交函数中(即 onsubmit="return commit()"),代码调用了一个名为 commit() 的 JavaScript 函数。
在 commit() 函数中,我们无法看到如何获取执行时返回的结果。可能需要进一步查看 integration.js 文件中的代码,看看是否有相关的处理逻辑。一般来说,我们可以通过使用 XMLHttpRequest 对象来向服务器发送请求,并通过监听 XMLHttpRequest 对象的 readyState 和 status 属性来获取服务器返回的数据。