"copier un champ"
Bootstrap 4.1.1 Snippet by lakhsimhasna

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <input type="text" id="from" /> <input type="checkbox" onchange="copyContent('from', 'to');" /> <input type="text" id="to" />
function copyContent(from, to) { var copied = document.getElementById(from); var receiver = document.getElementById(to); receiver.value = copied.value; }

Related: See More


Questions / Comments: