2
I found this code that works very well in inputs:
<script>
$(function() {
$("[name='email']").keyup(function() {
var email = $(this).val();
$("[name='login']").val(email); }); });
</script>
<input type="text" name="email" placeholder='email' />
<input type="text" name="login" placeholder='login' />
But I made some modifications wanting to work on other elements like span.
<script>
$(function() {
$("[name='email']").keyup(function() {
var email = $(this).val();
$(email).insertAfter("span.login"); }); });
</script>
<input type="text" name="email" placeholder='email' />
<span class="login"></span>
but it doesn’t work, but if I put any ready text in place of $(email). insertAfter ai works, there is a way to function as it works in input?
worked very well, and the difference between your in . html and the friend below . text, his has more performance, but as our friend is with less medals, I gave the vote to him, thank you very much.
– flourigh