Coder Social home page Coder Social logo

Comments (3)

lln133208 avatar lln133208 commented on August 24, 2024

您好,您的教程写得很好,自己正在一步一步学习python,目前学习到使用tornado开发网站这里碰到一个问题,希望得到您的解答,谢谢。

自己对前端的东西不是很懂,下载了jQuery库后不知道如何使用,在官网下载1.11.4版本,解压后其中有很多js脚本和css文件,js脚本有jquery-ui.js, jquery-ui.min.js,按照您的教程中所讲,我将第二个脚本复制到我的tornado项目的statics/js/目录下,其余部分也都是按照您的教程来做的,运行server.py之后,使用chrome浏览器访问127.0.0.1:8000后,发现无法交互,服务器那边提示无法打开js文件。

我核对了js脚本的目录和权限,都没有问题。

如果我不使用static_url函数,而是直接使用js脚本的绝对路径,服务器不会提醒说打不开js脚本,得到Http code是404,依然是找不到该脚本。

from starterlearningpython.

qiwsir avatar qiwsir commented on August 24, 2024

你使用浏览器调试一下,看看报错信息。另外,写一个静态网页,使用js,试试。特别注意路径写法。

在 2015年9月11日 下午3:14,RenYuan [email protected]写道:

您好,您的教程写得很好,自己正在一步一步学习python,目前学习到使用tornado开发网站这里碰到一个问题,希望得到您的解答,谢谢。

自己对前端的东西不是很懂,下载了jQuery库后不知道如何使用,在官网下载1.11.4版本,解压后其中有很多js脚本和css文件,js脚本有jquery-ui.js,
jquery-ui.min.js,按照您的教程中所讲,我将第二个脚本复制到我的tornado项目的statics/js/目录下,其余部分也都是按照您的教程来做的,运行server.py之后,使用chrome浏览器访问127.0.0.1:8000后,发现无法交互,服务器那边提示无法打开js文件。

我核对了js脚本的目录和权限,都没有问题。

如果我不使用_static_url_函数,而是直接使用js脚本的绝对路径,服务器不会提醒说打不开js脚本,得到Http
code是404,依然是找不到该脚本。


Reply to this email directly or view it on GitHub
#24 (comment)
.

QiWei

from starterlearningpython.

lln133208 avatar lln133208 commented on August 24, 2024

你使用浏览器调试一下,看看报错信息。另外,写一个静态网页,使用js,试试。特别注意路径写法。

搞定了,之前下载的是jqueryui,我换成jquery后好了,google一下,还是有区别的啊。谢谢啊

from starterlearningpython.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.