Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en" id="html">
- <head>
- <meta charset="UTF-8">
- <title>Study</title>
- </head>
- <body>
- <form name="nameForm" id="nameForm">
- <lable for="fname">First name</lable>
- <div class="inputdiv">
- <input type="text" id="fname" name="fname" value="Bill">
- </div>
- <lable for="sname">Second name</lable>
- <div class="inputdiv">
- <input type="text" id="sname" name="sname" value="Gates">
- </div>
- <input id="inputSubmit" type="submit">
- <!--<button id="testFormSubmit" type="submit">Send!</button>-->
- <h1 id="post">POST FORM!</h1>
- </form>
- <form name="testForm" id="testForm">
- <label for="chb1">Test Chb1</label>
- <input type="checkbox" id="chb1" value="testChb1">
- <label for="chb2">Test Chb2</label>
- <input type="checkbox" id="chb2" value="testChb2" checked>
- <label for="chb3">Test Chb3</label>
- <input type="checkbox" id="chb3" value="testChb3">
- <label for="r1">"Fixed Rate"</label>
- <input type="radio" id="r1" name="rate1" value="Fixed Rate">
- <label for="r2">"Variable Rate"</label>
- <input type="radio" id="r2" name="rate2" value="Variable Rate">
- <label for="r3">"Multi Rate"</label>
- <input type="radio" id="r3" name="rate3" value="Multi Rate" checked="checked">
- <select id="rates">
- <option value="FR">Fixed Rate</option>
- <option value="VR">Variable Rate</option>
- <option value="MR">Multi Rate</option>
- </select>
- </form>
- <script>
- 'use strict'
- //const form = document.getElementById('testForm');
- //const hPost = document.getElementById('post');
- //form.addEventListener('submit', (event) => { console.log('Try to submit form!'); event.preventDefault(); });
- //form.addEventListener('click', (event) => {
- // console.log(`click occured at -> ${event.target.id}`);
- //});
- //hPost.addEventListener('click', (event) => {
- // form.submit();
- //});
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment