How to make simplier the jquery code
<p>Aim is to detect if after page load input values are changed.</p>

<p>Input fields (19 fields) for example</p>

<pre><code>&lt;input type="text" name="date_day1" id="date_day1" value=" &gt;
&lt;input type="text" name="date_month1" id="date_month1" value=" &gt;
&lt;input type="text" name="date_year1" id="date_year1" value=" &gt;
&lt;input type="text" name="amount1" id="amount1" value=" &gt;
</code></pre>

<p>Then hidden input field like this</p>

<pre><code>&lt;input type="text" name="is_row_changed1" id="is_row_changed1" value=""&gt;
&lt;script&gt;

$("#date_day1").on("change", function () {
    document.getElementById('is_row_changed1').value = 1;
});

$("#date_month1").on("change", function () {
    document.getElementById('is_row_changed1').value = 1;
});

&lt;/script&gt;
</code></pre>

<p>If in any of input fields (19 fields) value is changed, then I need to reflect it in this hidden input field (I decided to set the hidden input field value to 1).</p>

<p>After that ajax with php where I check if the hidden input field value is 1. If 1, then update mysql. Aim is to reduce usage of server resources.</p>

<p><strong>Question</strong>
Javascript code for the hidden input field would be long. May be some way (code) to make is shorter (simplier)?</p>
