Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head><title>Update Address</title></head>
- <body>
- <!-- BAD: embedding scripts directly in page, esp. in body -->
- <script>
- <!-- // BAD: "hide" script body in HTML comment
- // (modern browsers may not see script at all)
- function checkValid() { // BAD: checkValid is global
- if !(fieldsValid(getElementById('addr'))) {
- // BAD: > and < may confuse browser's HTML parser
- alert('>>> Please fix errors & resubmit. <<<');
- }
- // BAD: "hide" end of HTML comment (l.3) in JS comment: -->
- </script>
- <!-- BAD: using HTML attributes for JS event handlers -->
- <form onsubmit="return checkValid()" id="addr" action="/update">
- <input onchange="RP.filter_adult" type="checkbox"/>
- <!-- BAD: URL using 'javascript:' -->
- <a href="javascript:back()">Go Back</a>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement