【发布时间】:2015-01-18 10:19:35
【问题描述】:
这是我的简单html,当我直接打开文件时,没有问题
<html>
<head>
<meta charset="utf-8">a
<title>Demo</title>
</head>
<body>
<a href="http://jquery.com/">jQuery</a>
<script src="jquery.js"></script>
<script>
$( document ).ready(function() {
$( "a" ).click(function( event ) {
alert( "The link will no longer take you to jquery.com" );
event.preventDefault();
});
});
</script>
</body>
</html>
但是,如果我输入 http://localhost:8000/tornaod 会给我WARNING:tornado.access:404 GET /jquery.js (::1) 3.00ms 的错误
以下是我的简单龙卷风代码...我不确定我的代码有什么问题...
class IndexHandler(tornado.web.RequestHandler):
def get(self):
self.render("./pages/index.html")
app = tornado.web.Application([(r'/test1', Test1Handler),
(r'/test2', Test2Handler),
(r'/test3', Test3Handler),
(r'/', IndexHandler)],
debug=True)
app.listen(options.port)
tornado.ioloop.IOLoop.instance().start()
【问题讨论】: