-1
當我點擊鏈接時,我不得不彈出一個窗口,它將接受一些細節並將處理後的數據發送回該頁面。如何知道網頁(url)是從哪裏進入jsp並將處理後的數據發送到該頁面?
當我點擊鏈接時,我不得不彈出一個窗口,它將接受一些細節並將處理後的數據發送回該頁面。如何知道網頁(url)是從哪裏進入jsp並將處理後的數據發送到該頁面?
可以參數的一些堡壘設置要求,並使用相同的彈出
如:
在父頁面:
<% request.setAttribute("someVariable",request.getRequestURI()); %>
在孩子
<% String oldUrl = (String)request.getAttribute("someVariable");
使用引導程序,你可以這樣做.....
<a href="#" data-toggle="modal" data-target="#password">I forgot my password</a>
//------------bootstrap modal--------------
<div class="modal fade" id="password" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="exampleModalLabel">Enter Mail</h4>
</div>
<div class=" modal-body">
<form action="forgot_password.php" method="POST" >
<div class="row">
<div class="form-group col-md-8">
<label for="recipient-name" class="control-label">Mail Id:</label>
<input type="mail" name="mail" class="form-control" />
</div>
</div>
</div>
<div class="modal-footer">
<input type="submit" value="Send" class="btn btn-primary">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</form>
</div>
比方說,針對home.jsp有一個鏈接,按process.jsp打開之後。在process.jsp中提交按鈕後,處理後的數據應反映在home.jsp ..>上 – user3247776