HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head> <body> <h1>jQuery removeProp() Method</h1> <p>My Name is <span></span>.</p> <script> $(document).ready(function(){ $("span").prop("name", "Jade"); $("span").removeProp("name"); $("span").text($("span").prop("name")); }); </script> <p><strong>Note</strong>: Try to remove 'removeProp' and click on run button.</p> </body> </html>
OUTPUT
×

Save as Private