Solution 1 :

You can achieve it in this simple way

$("#first-field").on("keyup", function(){
   var value = $(this).val();
   $("#second-field").val(value + "@gmail.com");
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input type="text" id="first-field">
<input type="text" id="second-field" placeholder="@gmail.com">

Problem :

I have two fields when I write something in the 1st field, 2nd field auto fill up, and 2nd field have all-time show @gmail.com. That means when I write something on the 1st field like admin 2nd field show it [email protected].I find some solution which only shows to write 1st filed to 2nd filed but not with default text [email protected].

Here is the image which shows what I want

Comments

Comment posted by RadwanAnik

Thanks, @Phong.that’s the answer what I want.

By