javascript在flas中不工作

2024-06-26 02:13:11 发布

您现在位置:Python中文网/ 问答频道 /正文

在 在

在 在

<title>TheSaaS - Responsive Bootstrap SaaS, Software & WebApp Template</title>

<script>if (top !== self) top.location.replace(self.location.href +'?utm_source=themeforest&utm_medium=preview&utm_campaign=thesaas');</script>

<!-- Styles -->

<link type="text/css" href="{{url_for('static',filename='assets/css/core.min.css')}}" rel="stylesheet">
<link type="text/css" href="{{url_for('static',filename='assets/css/thesaas.min.css')}}" rel="stylesheet">
<link type="text/css" href="{{url_for('static',filename='assets/css/style.css')}}" rel="stylesheet">

<!-- Favicons -->
<link rel="apple-touch-icon" href="{{url_for('static',filename='assets/img/apple-touch-icon.png')}}">
<link rel="icon" href="{{url_for('static',filename='assets/img/favicon.png')}}">

<!--  Open Graph Tags -->
<meta property="og:title" content="TheSaaS">
<meta property="og:description" content="A responsive, professional, and multipurpose SaaS, Software, Startup and WebApp landing template powered by Bootstrap 4.">
<meta property="og:image" content="http://thetheme.io/thesaas/assets/img/og-img.jpg">
<meta property="og:url" content="http://thetheme.io/thesaas/">
<meta name="twitter:card" content="summary_large_image">

^{pr2}$

在 在

你好, 这是我修改过的模板。。外置烧瓶当我运行这个,这工作很好(没有网址为)。但是当我试图在flask中使用时,javascript文件不起作用。。请帮帮我


Tags: urlimgforlinkstaticpropertycontentfilename
2条回答

确保您的目录结构已经针对flask应用程序的根目录进行了修改,否则您将请求不在那里的js文件

你不必为使用url_。相反,请尝试:

<link type="text/css" src="{static/assets/css/core.min.css}" rel="stylesheet">

相关问题 更多 >