How to add a text inside a div JQuery, for this project make sure to add JQuery file.
Demo:
<!doctype html>
<html>
<!-- copyright 2018-2030 -->
<title>Powered by Computer Master</title>
<body>
<button id="show_more">Show more</button>
<!-- the text will show in this div -->
<div id="result"></div>
<script src="jquery-3.3.1.min.js"></script>
<script>
$('document').ready(function(){
$("#show_more").click(function(){
$('#result').append("i am new text<br>") ;
})
});
</script>
</body>
</html>
No comments:
Post a Comment