form submit - How do I display text above after submitting it into a textbox HTML -


i'm trying create area in can enter text text box , display written text onto box above in html. i'm new html appreciated. drew beautiful picture of i'm trying make. enter image description here

the best way deal situation use javascript or jquery javascript's library itself. let me show how should in jquery

<script   src="https://code.jquery.com/jquery-3.2.1.min.js"   integrity="sha256-hwg4gsxgfzhoseeamdoygbf13fyquitwlaqgxvsngt4="   crossorigin="anonymous"></script>  <script>  	$(document).ready(function(){      	$("#form-to-be-submitted").click(function(){          	$(".whatever-styling-you-want").html($("#textbox").val());          });      });  	  </script>    <div class="whatever-styling-you-want">    </div>  <!-- text box , submit button -->  <div>        <input type="text" id="textbox" placeholder="please input text here..."/>        <input id="form-to-be-submitted" value="submit" type="button"/>  </div>

javascript's way same. no need use click function use javascript's on function 'click' event. hope helps.


Comments

Popular posts from this blog

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -