2016-09-20 144 views
0

我想開發一個HTML,提交後,我想重定向到另一個頁面使用javascript window.location.href標記但它不能正常工作,它重定向到同一頁面(或重新加載)
感謝..重定向窗口無法正常工作在sharepoint

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; 
        } 
       } 

      }); 
     } 

回答

0

嘗試網址與的http://

var url ="http://www.stackoverflow.com"; 
相關問題