重定向窗口在sharepoint中无法正常工作

时间:2016-09-20 19:15:59

标签: sharepoint spservices

我正在尝试开发一个html,在提交该页面之后我想使用javascript window.location.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;
                    }
                }

            });
        } 

1 个答案:

答案 0 :(得分:0)

使用 http://

尝试网址
 var url ="http://www.stackoverflow.com";