【发布时间】:2013-11-18 06:17:46
【问题描述】:
有什么方法可以在点击时加载 GIF 图像并同时进行导航。 我试过这种方式..
$("#Videop").click(function ()
{
//till the time the post function below doesn't return the following image will be displayed
tactile.page.getComponent("loadingnext").show();
$.post("http://cloud.netbiscuits.net/1305494/SyngentaMobileStage/aspx/Video.aspx",
function (data)
{
//get the new HTML content
$("#root").html(data);
});
});
但是与该页面相关的脚本文件和后台函数调用呢?
【问题讨论】:
-
data返回什么?导航页面使用window.location.href("www.google.com"); -
如果我使用 window.location.href("www.google.com") 那么导航会发生,但有些浏览器不会动画 gif 图像,所以我找到了一种使用 ajax 加载内容的方法,但是脚本文件 css 和后台调用没有调用与加载页面相关的调用。
-
那么
data包含什么?一个完整的html页面??? -
是的整个 html 页面..
-
这是一种非常糟糕的做法
标签: javascript html ajax jquery