4. HTML5 uses twonew objects for storing data on the client :-local Storage :- stores data with no time limit. session Storage :- stores data for one session. By:AhmedYousef
8. <script type="text/javascript">if (localStorage.pagecount) { localStorage.pagecount=Number(localStorage.pagecount) +1; } else{ localStorage.pagecount=1; } document.write("Visits: " + localStorage.pagecount + " time(s)."); </script> <p>Refresh the page to see the counterincrease.</p> <p>Close the browser window, and tryagain, and the counterwill continue.</p> By:AhmedYousef
12. <script type="text/javascript">if (sessionStorage.pagecount) { sessionStorage.pagecount=Number(sessionStorage.pagecount) +1; } else { sessionStorage.pagecount=1; } document.write("Visits " + sessionStorage.pagecount + " time(s) this session."); </script> <p>Refresh the page to see the counter increase.</p> <p>Close the browser window, and try again, and the counter has been reset.</p> By:AhmedYousef
46. There are several wayes to write Date:-date - Selects date, month and year month - Selects month and year week - Selects week and year time - Selects time (hour and minute) datetime - Selects time, date, month and year (UTC time) datetime-local - Selects time, date, month and year (local time) By:AhmedYousef