0
嘿家伙所以这个页面即时通讯尝试创建具有每个标签的月份名称的标签和标签的内容是一个表单和提交按钮。例如,即时通讯面临的问题是,如果即时通讯在二月份的标签页上,我填写了表格,当我点击提交页面重新载入(数据插入到数据库)并返回到一月份的第一个标签。我如何阻止这种情况发生?这意味着点击提交并且数据插入成功后,它仍然保留在二月份选项卡上。我读过,我必须使用onClick属性的标签,但多数民众赞成在它。我的JavaScript知识很少。与内容标签的onclick jquery提交表单,无需重新加载页面
部分:
<div class="tabContent" id="feb">
<form method="post" action="income.php">
<input type="hidden" name="feb" value="February">
<center><h2>February </h2></center>
<div>
<div style="height:0px;">
<div class="rmtotal">
<h3>Your Total Income :</br> RM <input type="text" id="febtotal"
name="febtotal" size="11" readonly value="<?php if(@$fsql) {echo
htmlentities(@$fprev['total']);} if(isset($_POST['febtotal']))
{echo htmlentities($_POST['febtotal']);}?>" ></h3>
</div>
<input type="submit" value="Save" class="save" name="febsave">
<button type="submit" class="prev" name="febprev" id="button"
onClick="">Select from previous Month</button>
</div>
<table border="1" rules="groups" cellpadding="10px;" class="tableincome">
<thead>
<th>Monthly Salary</th>
<th></th>
<th>RM</th>
</thead>
<tr>
<td>Basic Salary</td>
<td></td>
<td><center><input type="text" class="feb" placeholder="0"
name="febbasic" size="11" value="<?php if(@$fsql) {echo
htmlentities(@$fprev['basic']);} if(isset($_POST['febbasic'])){echo
htmlentities($_POST['febbasic']);}?>"></center></td>
</tr>
</table>
</form>
</div>
</div>