jquery未在使用google app engine的python中运行
我是python的新手。我想在python中运行jquery datatable,因为我有单独的html文件。我的标签是通过使用AppEngine在html输出中运行的,但我已经用我的html表实现了datatable,但它只是显示一些东西,而不是执行datatable函数。我已经包括了所有css和jQuery。它在javascript标记中显示警报,但在$document.ready中未显示。这表示此函数未运行。显然,datatable不会与这个表绑定。请帮帮我!提前一吨谢谢你jquery未在使用google app engine的python中运行,jquery,Jquery,我是python的新手。我想在python中运行jquery datatable,因为我有单独的html文件。我的标签是通过使用AppEngine在html输出中运行的,但我已经用我的html表实现了datatable,但它只是显示一些东西,而不是执行datatable函数。我已经包括了所有css和jQuery。它在javascript标记中显示警报,但在$document.ready中未显示。这表示此函数未运行。显然,datatable不会与这个表绑定。请帮帮我!提前一吨谢谢你 <htm
<html>
<head>
<style type="text/css" title="currentStyle">
@import "DataTables/media/css/demo_page.css";
@import "DataTables/media/css/demo_table.css";
@import "DataTables/media/css/demo_table_jui.css";
@import "DataTables/development-bundle/themes/smoothness/jquery-ui-1.8.6.custom.css";
</style>
<script type="text/javascript" language="javascript" src="jquery.js"></script>
<script type="text/javascript" language="javascript" src="DataTables/media/js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript" src="DataTables/media/unit_testing/tests_onhold/1_dom/bJQueryUI.js"></script>
<script type="text/javascript">
alert ("Entered in javascript...");
$(document).ready(function(){
alert("Got it...");
$("#display").dataTable({
"bJQueryUI":true
});
});
</script>
</head>
<body>
<table id="display">
{% for greeting in greetings %}
{% if greeting.author %}
<tr><td><b>{{greeting.author.nickname }}</b> wrote:</td>
{% else %}
An anonymous person wrote:
{% endif %}
<td><blockquote>{{ greeting.content|escape }}</blockquote></td></tr>
{% endfor %}
<tr><td>
<form action="/sign" method="post">
<div><textarea name="content" rows="3" cols="60"></textarea></div>
<div><input type="submit" value="Sign Guestbook"></div>
</form>
</tr></td></table>
</body>
</html>
@导入“DataTables/media/css/demo_page.css”;
@导入“DataTables/media/css/demo_table.css”;
@导入“DataTables/media/css/demo_table_jui.css”;
@导入“DataTables/developmentbundle/themes/smoothness/jquery-ui-1.8.6.custom.css”;
警报(“在javascript中输入…”);
$(文档).ready(函数(){
警惕(“明白了…”);
$(“#显示”).dataTable({
“bJQueryUI”:真的吗
});
});
{%表示问候语中的问候语%}
{%if greeting.author%}
{{greeting.author.昵称}}写道:
{%else%}
一位匿名人士写道:
{%endif%}
{{greeting.content | escape}}
{%endfor%}
好的,这是我的代码。。。现在我错了…我想你的jquery文件的url是错误的。我复制了你的代码。当我将jquery脚本行更改为以下内容时,我得到了第二个警报
<script type="text/javascript" language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
您似乎对客户端上运行的内容和服务器上运行的内容感到困惑。阅读应该会让你更好地理解
我建议您使用类似的方法来帮助您发现客户端问题。在这种情况下,您很容易在firebug的net选项卡中看到url是错误的 jQuery不是“在python(/php/perl/ruby/…)中运行”,因为它是一个纯Javascript客户端库。因此,您的HTML代码有问题。如果您不显示代码,我们将无法帮助您。警报(“在javascript中输入…”)$(document).ready(function(){alert(“Got it…”);$(“#display”).dataTable({“bJQueryUI”:true});});{%forgreetingsingreetings%}{%if greeting.author%}{{{greeting.author.昵称}}写:{%else%}一个匿名的人写:{%endif%}{{{greeting.content | escape}{%endfor%}我已经附加了我的html代码,现在告诉我哪里错了。。