Walidator wypłakuje takie cuda
Cytat
document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
<input type="text" name="area" />
<input type="text" name="area" />
oraz
Cytat
document type does not allow element "select" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
…e="shape" size="1" onchange="this.form.area.value=doArea(this.selectedIndex);">
…e="shape" size="1" onchange="this.form.area.value=doArea(this.selectedIndex);">
Gdy dam te input i select poza form to wiadomo - nie będzie działać ;/
(Może div + value - liczba (potrzebna do switcha)

<script type="text/javascript"> <!-- function doArea(num) { switch(num) { case 0: return (""); break; case 1: var length = prompt("Wprowadź długość kwadratu:", ""); length = length * length; return (length); break; case 2: var width = prompt("Wprowadź szerokość podstawy:", ""); var height = prompt("Wprowadź wysokość:", ""); return (width * height / 2); break; case 3: var width = prompt("Wprowadź szerokość:", ""); var height = prompt("Wprowadź wysokość:", ""); return (width * height); break; case 4: var radius = prompt("Wprowadź promień okręgu: ", ""); case 5: var radius = prompt("Wprowadź promień kuli:", 0); case 6: var boka = prompt("Wprowadź długość podstawy:", ""); var height = prompt("Wprowadź wysokość:", ""); return (boka * height); break; } } --> </script>