數(shù)據(jù)中臺(tái) 前臺(tái)怎么向后臺(tái)傳數(shù)據(jù)?
前臺(tái)怎么向后臺(tái)傳數(shù)據(jù)?將值從JSP傳輸?shù)絪ervlet的方法:1。從超鏈接傳輸值:以窗體的形式,單擊“提交”時(shí),action=“servletaction”Method=“get/post”3。使用A
前臺(tái)怎么向后臺(tái)傳數(shù)據(jù)?
將值從JSP傳輸?shù)絪ervlet的方法:1。從超鏈接傳輸值:以窗體的形式,單擊“提交”時(shí),action=“servletaction”Method=“get/post”3。使用Ajax,url=“servletaction”,數(shù)據(jù):xxx參數(shù)當(dāng)然,也有兩種情況:get和post。Get直接在URL后面加一個(gè)問號(hào)傳遞參數(shù),post會(huì)把參數(shù)放在實(shí)體內(nèi)容中。最后,在servlet端使用它請(qǐng)求.getParameter(“參數(shù)名“);