使用a標籤實現頁面之間的跳轉,同時隱藏請求參數

 以當前頁面跳轉到百度頁面爲例,參數名爲requestParam 

<html>
	<head>
		<script>
			function redict(){
				document.redictForm.submit();
			}
		</script>
	</head>
	<body>
		<form name="redictForm"  action="http://www.baidu.com" method="post">
			<input type="hidden" name="requestParam" value="1234">
		</form>
		<a onclick="redict()">跳轉</a>
	</body>
</html>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章