Title | Lecture 8 (1)(1) |
---|---|
Course | Web Applications Development |
Institution | Baruch College CUNY |
Pages | 6 |
File Size | 91.1 KB |
File Type | |
Total Downloads | 110 |
Total Views | 139 |
lecture 8 notes web admin...
Week #8
COOKIES 1. HTML DOM (innerhtml) http://www.w3schools.com/js/js_htmldom_html.a sp
2. Lynda.com (arrays free) Javascript Essentials (2007) 3. Lynda.com –Strings 4. Cookies 5. Lynda reg expressions/html5 input types – validating forms using Javascript/PHP 6. Textbook Chapters 8 and 9 7. www.w3schools.com (Javascript through strings)
Useful web sites www.caniuse.com www.html5patterns.com https://www.wikihow.com/View-Cookies
Cookies Max 300 4kb size of each
20 cookies per domain
document.cookie = “lastname=” + “white”
document.cookie =”lastname=white”; document.cookie = “firstname=” + “sally”
”lastname=white; firstname=sally” encodeURIComponent(“Don”) decodeURIComponent( )
Coordinated Universal Time (UTC) -----GMT
Mon dec 27 14:13:34 pst 2011
Var expdate = new Date(); expdate.setFullYear(expdate.getFullYear() + 1); document.cookie = encodeURIComponent(“name=Don”) +
“; expires=” + expdate.toUTCString();
If (document.cookie != “ “) { username = document.cookie.split(“=”)[1]; }
function setCookie() { username = document.myform.namefield.value Document.cookie = “usrname=” + username +”;expires=” + expdate.toUTCString() }
Picture Rotation
This will get a cookie
This will set a cookie
Work on group Project...