codice:<!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Pagina vuota</title> <script type="text/javascript"> function increaseDay(nDelta) { var aFragms = document.myForm.myDate.value.split("."), oNewDate = new Date(parseFloat(aFragms[2]), parseFloat(aFragms[1]) - 1, parseFloat(aFragms[0]) + nDelta); document.myForm.myDate.value = oNewDate.getDate() + "." + String(oNewDate.getMonth() + 1) + "." + oNewDate.getFullYear(); document.myForm.submit(); } </script> </head> <body> <iframe name="myIframe" src="http://www.google.it" style="width:100%;height:200px;margin-bottom:100px;"></iframe> <form name="myForm" target="myIframe" method="post"> <fieldset> <legend>Data</legend> <input type="text" name="myDate" value="13.2.1999" /> <input type="button" value="+" onclick="increaseDay(1);" /> <input type="button" value="-" onclick="increaseDay(-1);" /> </fieldset> </form> </body> </html>![]()

Rispondi quotando