0
工作
大家都是想在HTML(webpy模板)的JavaScript,但它並不work.the在html javascript代碼工作得非常好......包括腳本不web.py
以下是主要蟒文件(main.py):
urls = ('/main','main')
render = web.template.render('templates/')
class main:
def GET(self):
return render.main()
app = web.application(urls,globals())
if __name__ == "__main__":
app.run()
模板/ main.htm中:
<body>
<script type="text/javascript" src="include.js"></script>
<script>
alert(location.href); //this line works..
</script>
</body>
include.js:
alert('test'); //this line doesn't work
它現在的作品,非常感謝你! – 2011-06-09 07:42:22