Web.QHMIT
.com
Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
Run
<!DOCTYPE html> <title>My Example</title> <style> .box { background: orange; color: white; width: 150px; padding: 20px; margin: 10px; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script> $( function() { $( "button" ).click( function() { $( ".box" ).prepend( "<p>Surprise!</p>" ); }); }); </script> <button>Add Content</button> <div class="box"> <p>Main content.</p> </div>
Preview