How to use Changing Method in HTML JQuary

This article describe about jQuary HTML Change Paragraph.
  • 1870

jQuery HTML

jQuary HTML is provided two methods: Changing and adding.

Changing HTML method in jQuery

Changing method is used a paragraph page change in another paragraph.

Syntax

$(selector).html(text)

Example

<!DOCTYPE html>

<html>

<head>

<script type="text/javascript" src="jquery.js"></script>

<script type="text/javascript">

    $(document).ready(function ()

    {

        $("button").click(function ()

         {

            $("p").html(".Net Heaven");

        });

    });

</script>

</head>

 

<body>

<h2>This is a jQuery</h2>

<p>This is a HTML.</p>

<p>This is a change method.</p>

<button>Change</button>

</body>

</html>

 

Output

OP 1.jpg

After click this button

op2.jpg

You may also want to read these related articles here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2019 DotNetHeaven. All rights reserved.