我正在尝试开发一个html,提交该页面后,我想重定向到另一个页面使用javascript窗口。位置。href标签,但它不能正常工作,它重定向到同一页面(或重新加载)
谢谢. .
function submit(){
$().SPServices({
operation: "UpdateListItems",
async: true,
batchCmd: "New",
listName: "list",
valuepairs: [["ReportTitle",$('#txtTitle').val()],
["VerticalL1",$('#ddlL1 option:selected').text()],
["VerticalL2",$('#ddlL2 option:selected').text()],
["ReasonForSuggestingTitle",$('#txtReason').val()]],
completefunc: function(xData, Status) {
if (Status == 'success' && $(xData.responseXML).find('ErrorCode').text() == '0x00000000') {
alert('Thank you for responding to our survey!');
var url ="www.stackoverflow.com";
window.location.href= url;
}
}
});
}
试着url http://
var url ="http://www.stackoverflow.com";