Date format in javascript and html by saddam
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> D.O.B: <select> <script language="javascript" type="text/javascript"> for(var day=1;day<=31;day++) { document.write("<option>"+day+"</option>"); } </script> </select> <select> <script language="javascript" type="text/javascript"> var month=new Array('jan','Feb','Mar','Apr','Mar','May','Jun','Jul','Aug','Oct','Nov','Dec'); for(var i=0;i<month.length;i++) { document.write("<option>"+month[i]+"</option>"); } </script> </select> <select> <script language="javascript" type="text/javascript"> for(var year=1990; year<=2014;year++) { document.write("<option>"+year+"</option>"); } </script> </select> </body> </html>
Comments
Post a Comment