In an HTML form, how do I copy content of one field to another -
i need button takes information have entered 1 div, , put another. have 1 div asks delivery information, while other asks billing info. want have button can press checks if have filled out delivery info pressing button make information entered delivery information transfer billing info. how make button that?
javascript:
<script language="javascript"> document.getelementbyid('your-button').addeventlistener("click", movecontent); function movecontent() { document.getelementbyid('your-div').textcontent = document.getelementbyid('other-div').textcontent; } </script> html:
<button id="your-button">move content</button><br /> <div id="other-div">this text go div below</div> <div id="your-div">click button move text above text here</div>
Comments
Post a Comment