0
我正在做一个网站使用python的瓶框架,我似乎无法让我的javascript页面与html一样使用我的外部css文件。我不确定发生错误的位置,无论是在我的HTML头(下面)中,我将JavaScript链接到JavaScript文件还是在python文件中。JavaScript没有与python网站上加载
<head>
<meta charset="UTF-8">
<link rel = "stylesheet" type="text/css" href="../static/HotelStyle.css">
<title> Hotel </title>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="../static/hotel.js"></script>
<script type="text/javascript"></script>
</head>
如果您使用的是Flask,通常最好使用url_for来获取静态资源的URL。见http://flask.pocoo.org/docs/0.10/quickstart/#static-files –
谢谢,我试过链接说,它仍然没有工作,它可能是与JavaScript文件本身? –