$不用彷徨不工作在我的服务器 [英] $.get is not working in my server
本文介绍了$不用彷徨不工作在我的服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我与Visual Studio运行以下code的工作:
The following code is working when I run with visual studio:
$.get('@Url.Content("Content/templates/new_story.htm")', function (tr) {
$("#table_body").append(tr.replace(/#story/g, storyNumber));
});
但是,当我在IIS 7.5发布,新的HTML未装入 #table_body
。
为什么?
推荐答案
我已经看到了这个,当我发布到一个虚拟目录。我想你会想要做的就是添加一个蒂尔达到您的网址:
I've seen this when I publish to a virtual directory. I think what you'll want to do is add a tilda to your URL:
$.get('@Url.Content("~/Content/templates/new_story.htm")', function (tr) {
$("#table_body").append(tr.replace(/#story/g, storyNumber));
});
这篇关于$不用彷徨不工作在我的服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文