我的源代码:
var http = require("http");
var count=1;
http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hi, you are number "+count+" visitors");
response.end();
count++;
}).listen(8888);
Run Code Online (Sandbox Code Playgroud)
我每次访问都得到1,3,5,7,..... 为什么要将计数增加2?
我想在我自己的网站上使用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>
Run Code Online (Sandbox Code Playgroud)
当我提交表单时,我希望看到结果页面带有"Decode Succeeded"消息.相反,我看到我试图复制的原始远程表单.
你能发现我的自定义表格有什么问题吗?