Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <head>
- <script type="text/javascript">
- function popup()
- {
- confirm ("Welcome!");
- }
- </script>
- </head>
- <body>
- <button onclick="popup()">Try it</button>
- </body>
- <head>
- <script type="text/javascript">
- function popup()
- {
- document.getElementById("div").innerHTML="Welcome!"
- }
- </script>
- </head>
- <body>
- <button onclick="popup()">Try it</button>
- <div id="div"></div>
- </body>
- <html>
- <head>
- <script src="https://code.jquery.com/jquery-2.1.0.min.js"></script>
- <script>
- jQuery(document).ready(function() {
- jQuery('#mybutton').click(function() {
- jQuery('#mytext').append('This is a line of text');
- });
- });
- </script>
- </head>
- <body>
- <button id="mybutton">Try it</button>
- <div id="mytext"></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement