我有以下两种形式。有没有办法检测表单的值何时发生变化,最好是记录前后的值,如果是,则实际更改该值的是什么函数。
<div class="chkField">
<label for="billing_state">[CustomerInfo_state]</label>
<select id="billing_state" onchange="check_address('billing');" name="billing_state" tabindex="9" class="txtBoxStyle">
</select>
<!--START: req_billing_state-->
<img src="assets/templates/common/images/error2.gif" width="12" height="12" alt="" />
<!--END: req_billing_state-->
<div class="clear"></div>
</div>
<div class="chkField">
<label for="billing_zip">[CustomerInfo_zip]</label>
<input name="billing_zip" maxlength="15" type="text" id="billing_zip" value="[billing_zip]" size="10" tabindex="10" class="txtBoxStyle" onchange="clearContent(this);check_address('billing');" />
<!--START: req_billing_zip-->
<img src="assets/templates/common/images/error2.gif" width="12" height="12" alt="" />
<!--END: req_billing_zip-->
<div class="clear"></div>
</div>