1
我想用一個'彈出圖片'來顯示一個簡單的用戶指南圖片,用戶點擊搜索後圖片會彈出,讓他們更好地瞭解結果。所以當用戶關閉圖片時,他們會鏈接到results.php。抱歉,我無法提供任何有用的JavaScript代碼,因爲我從互聯網上找到的那些代碼太長。我很喜歡javascript。Javascript PHP一個彈出圖片出現在點擊搜索後,關閉圖片後顯示搜索結果
保存後>會話
<?php
$loan_amt = $_POST['loan_amt'];
if($_POST['search']){
if($_POST['loan_amt']=="" || $_POST['loan_tenure']==""){
$error = "Please fill up the mandatory fields";
}else{
session_start();
$_SESSION['property_type'] = $_POST['property_type'];
$_SESSION['property_status'] = $_POST['property_status'];
$_SESSION['loan_amt'] = $_POST['loan_amt'];
$_SESSION['loan_tenure'] = $_POST['loan_tenure'];
header("location:rates_result.php");
}
}
?>
搜索表單,在彈出的頁面(貸款金額場)
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" onsubmit="this.loan_amt.value=this.loan_amt.value.replace(/\,/g,'')">
<table width="400px">
<tr>
<td class="color1" width="130">Loan Amt (SGD)*:</td>
<td width="258" align="left">
<input type="text" style="width:150px;font-size:16px" onkeyup="format(this)" onchange="format(this)"
onblur="if(this.value.indexOf('.')==-1)this.value=this.value" name="loan_amt">
</td>
<td width="258" align="left"><input type="submit" class="buttonStyle" name="search" value="search" /></td>
</tr>
</table>
</form>