jQuery ajax發送POST、JS url跳轉、console用法

總結JS常用方法,以備以後使用

$.post("URL1",{userName: userName, password: password },
	function(data) {
		//console用法
		console.log("輸出日誌信息");
		//JS 跳轉到URL頁面
		window.location.href = "http://example.com";
	});

如果有幫到您,打個賞唄在這裏插入圖片描述

發佈了81 篇原創文章 · 獲贊 103 · 訪問量 24萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章