将表单发送到远程服务器

时间:2013-02-28 08:07:45

标签: html html-form

我想在我自己的网站中使用http://zxing.org/w/decode.jspx提供的服务和自定义表单。我写了以下代码:

<html>
<body>
    <FORM action="http://zxing.org/w/decode.jspx" method="post">
        <INPUT type="text" name="u" value="http://justinsomnia.org/images/qr-code-justinsomnia.png">
        <INPUT type="submit" value="Send"> 
    </FORM>
</body>
</html>

当我提交表单时,我希望看到结果页面带有“Decode Succeeded”消息。相反,我看到我试图复制的原始远程表单。

你能发现我的自定义表格有什么问题吗?

1 个答案:

答案 0 :(得分:5)

   <html>
   <body>
   <FORM action="http://zxing.org/w/decode" method="get">
   <INPUT type="text" name="u" value="http://justinsomnia.org/images/qr-code-justinsomnia.png">
   <INPUT type="submit" value="Send"> 
    </FORM>
    </body>
    </html>

您应该使用获取而不是发布方法。您发布到错误的网址,发布到http://zxing.org/w/decode。我查了一下,它现在正在工作。