weebl Skrevet 7. april 2010 Del Skrevet 7. april 2010 (endret) Hei, jeg sliter litt med å få en nettside jeg jobber med til å validere. jeg får to feil i den delen hvor jeg har et inputform. altså denne delen: <form id="greeting" onsubmit="hello()" action=""> <input type="text" value="enter your name here" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;"/> </form> koden for siden ser dere under, feilen for valideringa kan dere se i validatoren. noen som kan hjelpe meg å løse denne? siden må validere uten noen feil etter som at dette er en skoleoppgave. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>CS15020 Assignment</title> <link href="[url="view-source:http://users.aber.ac.uk/nao9/cs15020/style.css"]style.css[/url]" rel="stylesheet" type="text/css" /> <script type="text/javascript"> <!-- function hello() { myForm = document.getElementById("greeting"); name = myForm.elements[0].value; var now = new Date(); hour = now.getHours(); if (hour < 12) { alert("Good Morning "+name) } else { alert("Good Afternoon "+name) } } --> </script> </head> <body> <div id="wrapper"> <div id="header"></div> <div id="menu"> <ul class="menu"> <li class="home"><a href="[url="view-source:http://users.aber.ac.uk/nao9/cs15020/#"]#[/url]" title=""><img alt="home" src="[url="view-source:http://users.aber.ac.uk/nao9/cs15020/images/home.png"]images/home.png[/url]"/></a></li> <li class="blog"><a href="[url="view-source:http://users.aber.ac.uk/nao9/wordpress/"]http://users.aber.ac.uk/nao9/wordpress/[/url]" title=""><img alt="home" src="[url="view-source:http://users.aber.ac.uk/nao9/cs15020/images/blog.png"]images/blog.png[/url]"/></a></li> <li class="shop"><a href="[url="view-source:http://users.aber.ac.uk/nao9/webshop/catalog/"]http://users.aber.ac.uk/nao9/webshop/catalog/[/url]" title="" ><img alt="home" src="[url="view-source:http://users.aber.ac.uk/nao9/cs15020/images/shop.png"]images/shop.png[/url]"/></a></li> <li class="writeup"><a href="[url="view-source:http://users.aber.ac.uk/nao9/cs15020/#"]#[/url]" title=""><img alt="home" src="[url="view-source:http://users.aber.ac.uk/nao9/cs15020/images/writeup.png"]images/writeup.png[/url]"/></a></li> <li class="cv"><a href="[url="view-source:http://users.aber.ac.uk/nao9/cs15020/#"]#[/url]" title=""><img alt="home" src="[url="view-source:http://users.aber.ac.uk/nao9/cs15020/images/cv.png"]images/cv.png[/url]"/></a></li> </ul> </div> <div id="container"> <form id="greeting" onsubmit="hello()" action=""> <input type="text" value="enter your name here" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;"/> </form> <div id="mainContent"> <h1> Main Content </h1> <p>Welcome to my cs15020 assignment page!</p> <p>Disclaimer:</p> <ul> <li>This submission is my own work</li> <li>I understand that there are severe penalties for plagiarism and other kinds of unfair practice, which can lead to loss of marks or even the withholding of a degree.</li> <li>I have read the sections on unfair practice in the Students' Examinations Handbook and the relevant sections of the current Student Handbook of the Department of Computer Science.</li> <li>I understand and agree to abide by the Universitys regulations governing these issues.</li></ul> The information provided on this and other pages by me, <a href="[email="[email protected]"]mailto:[email protected][/email]">Nikolai Ovesen ([email protected])</a>, is under my own personal responsibility and not that of Aberystwyth University. Similarly, any opinions expressed are my own and are in no way to be taken as those of A.U. The use of the University's logo or crest is not allowed on individual user's web pages. </div> <div id="footer"> <a href="[url="view-source:http://validator.w3.org/check?uri=referer"]http://validator.w3.org/check?uri=referer[/url]"> <img src="[url="view-source:http://www.w3.org/Icons/valid-xhtml11-blue.png"]http://www.w3.org/Icons/valid-xhtml11-blue.png[/url]" alt="Valid XHTML 1.1" height="31" width="88" /></a> <a href="[url="view-source:http://jigsaw.w3.org/css-validator/check/referer"]http://jigsaw.w3.org/css-validator/check/referer[/url]"> <img style="border:0;width:88px;height:31px" src="[url="view-source:http://jigsaw.w3.org/css-validator/images/vcss-blue"]http://jigsaw.w3.org/css-validator/images/vcss-blue[/url]" alt="Valid CSS!" /></a> <br />Site last edited: <script type="text/javascript">document.write (document.lastModified);</script><br /> </div> </div> </div> </body> </html> på forhånd takk =) -Weebl Endret 7. april 2010 av weebl Lenke til kommentar
weebl Skrevet 7. april 2010 Forfatter Del Skrevet 7. april 2010 fiksa det selv slik: <div> <form id="greeting" onsubmit="hello()" action=""> <input type="text" value="enter your name here" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;" /> </form> </div> Lenke til kommentar
Anbefalte innlegg
Opprett en konto eller logg inn for å kommentere
Du må være et medlem for å kunne skrive en kommentar
Opprett konto
Det er enkelt å melde seg inn for å starte en ny konto!
Start en kontoLogg inn
Har du allerede en konto? Logg inn her.
Logg inn nå