Magic Icon Copy a Field's Value to another Element's innerHTML: Magic JavaScript

Quick Jump ↵

Does it onkeyup and onchange

Usage

Add data-mjf="copy_value_to_html" id="ELEMENT_ID" to your <input> or <textarea> tag.

Add <script type="text/javascript">$m.wand.copy_value_to_html = true;</script> inside your <body> tag.

Examples


<p><input type="text" name="" value="" data-mjf="copy_value_to_html" data-mjf_cvth_id="ELEMENT_ID_CONT_1" id="ELEMENT_ID_1"></p>
<p id="ELEMENT_ID_CONT_1"></p>


<p><textarea rows="5" cols="20" name="" data-mjf="copy_value_to_html" data-mjf_cvth_id="ELEMENT_ID_CONT_2" id="ELMENT_ID_2"></textarea></p>
<p id="ELEMENT_ID_CONT_2"></p>

« Back to the main documentation