我有一个相当广泛的表格,用于创建 3-4 页的报告。有时,由于某种原因,我无法填写并提交表格来生成报告。是否可以以某种方式将表单字段中的值保存到本地设备上的文件中,然后在稍后将该数据重新加载回表单中,以便检查/选择/加载所有相同的值?我假设我需要某种类型的 Javascript 按钮来循环并读取项目是否被选中,但我不确定如何保存和加载该信息。该表格的一个简短示例可能是:
<form method="POST" action="processnote.php">
<legend>
<h1>Academic Background</h1>
</legend>
<b>Highest Education Level</b>
<ul class="checkbox">
<li><input type="checkbox" name="education[]" id="education0" value="no formal education"><label for="education0">No Formal Education</label></li>
<li><input type="checkbox" name="education[]" id="education1" value="some high school"><label for="education1">Some High School</label></li>
<li><input type="checkbox" name="education[]" id="education2" value="high school/GED"><label for="education2">High School</label></li>
<li><input type="checkbox" name="education[]" id="education3" value="some college"><label for="education3">Some College</label></li>
<li><input type="checkbox" name="education[]" id="education4" value="trade school"><label for="education4">Trade School</label></li>
<li><input type="checkbox" name="education[]" id="education5" value="an associate degree"><label for="education5">Associate's Degree</label></li>
<li><input type="checkbox" name="education[]" id="education6" value="a bachelor degree"><label for="education6">Bachelor's Degree</label></li>
<li><input type="checkbox" name="education[]" id="education7" value="a master degree"><label for="education7">Master's Degree</label></li>
<li><input type="checkbox" name="education[]" id="education8" value="a doctoral degree"><label for="education8">Doctoral Degree</label></li>
<li><label for="education9">Other:</label><input type="text" name="education[]" id="education9" value=""></li>
</ul>
</p>
</form>
因此,如果选择“高中”和“某大学”并在文本字段中键入“证书课程”,我如何将这些值保存到文件中,然后将这些值重新加载回表单的清晰副本中?是否可以?(我知道几乎一切皆有可能......但你知道......对于新手来说这是合理的)
茅侃侃
MYYA
相关分类