文章詳情頁
html1-php-html2傳值問題
瀏覽:243日期:2023-06-11 13:49:51
問題描述
html1獲取用戶填寫數(shù)據(jù),發(fā)送給php計(jì)算后輸出json,html2讀取json展示數(shù)據(jù)給用戶看。
現(xiàn)在我想用戶提交后直接跳轉(zhuǎn)到html2,如何實(shí)現(xiàn)。
我知道AJAX可以返回給當(dāng)前頁面html1,但如何讓html2獲取數(shù)據(jù)呢。
問題解答
回答1:如果簡單數(shù)據(jù)直接寫在url中:
echo "<script>window.location.href='html2.html?name=admin'</script>";
或者存到session中
標(biāo)簽:
HTML
相關(guān)文章:
1. javascript - sublime快鍵鍵問題2. javascript - immutable配合react提升性能?3. vue.js - Vue 如何像Angular.js watch 一樣監(jiān)聽數(shù)據(jù)變化4. 配置Apache時,添加對PHP的支持時語法錯誤5. css - 寫頁面遇到個布局問題,求大佬們幫解答,在線等,急!~6. javascript - nodejs關(guān)于進(jìn)程間發(fā)送句柄的一點(diǎn)疑問7. javascript - 移動端上不能實(shí)現(xiàn)拖拽布局嗎?8. phpstudy8.1支持win11系統(tǒng)嗎?9. 實(shí)現(xiàn)bing搜索工具urlAPI提交10. Apache 已經(jīng)把網(wǎng)站根目錄的改為allow from all了,但是服務(wù)器還是不能訪問?
排行榜

熱門標(biāo)簽
網(wǎng)公網(wǎng)安備