Bladephp: Now with 7+ codeigniter, php, and laravel project 7+ php project From $18/Year From Rs. 1000/Year

How to Live Preview using jQuery

by
Category:jquery
jquery html
How to Live Preview using jQuery

In this tutorial you are going to learn how to make your own Live content preview application with the help of jQuery. When you start typing in the text fields the function will help us to show the preview immediately in the preview panel. You may also like Live Search in php with Ajax and Mysql and How to Create Live Voting System using Ajax and PHP

HTML and jQuery Code

<html>
    <head>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <script type="text/javascript">
            function preview()
            {
                $("#preview_div").html($("#text").val());
            }
        </script>
    </head>
    <body>
        <textarea id="text"onkeyup="preview();" placeholder="Enter Text Or Code"></textarea>
        <div id="preview_div"></div>
    </body>
</html>

0 Comments


Html code work in comment box


Related Post