Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Juhin sovellus</title>
- <link rel="stylesheet" src="styles.css" type="text/css">
- </head>
- <body>
- <div id="Container">
- <input type="text"/>
- <button id="Button1" type="button"> Button 1</button>
- <button id="Button2" type="button"> Button 2</button>
- <button id="Button3" type="button"> Button 3</button>
- </div>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
- <script type="text/javascript">
- // Koodaa tähän sun javascripti
- $( document ).ready(function() {
- $( "#Button1" ).click(function( event ) {
- alert( "Button 1 was clicked." );
- event.preventDefault();
- });
- $( "#Button2" ).click(function( event ) {
- alert( "Button 2 was clicked." );
- event.preventDefault();
- });
- $( "#Button3" ).click(function( event ) {
- alert( "Button 3 was clicked." );
- event.preventDefault();
- });
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement