【发布时间】:2012-03-07 05:11:41
【问题描述】:
@{
var host = Url.Content("~/");
}
<script type="text/javascript">
var host = "@host";
$(function () {
if ($("#Company" != null)) {
$("#companyselect").change(function () {
var newuri = host + "eg/" + $("#companyselect option:selected").text() + "/Comps";
window.location.url = newuri;
}
);
}
});
</script>
newuri = /bo/eg/airline inc/5
但是浏览器总是重定向到/eg/airline inc/5
【问题讨论】:
标签: jquery asp.net-mvc-3 url redirect