// session class Function session () {var sessionobj = null; this.init = function () {sessionobj = document.createElement ('input'); sessionobj.type = "hidden"; sessionobj.id = "sessionid"; sessionobj; sessionobj; .style.behavior = "URL ('# default # userdata')" Document.body.Appendchild (sessionobj);} this.load = function (sessionname) {if (sessionname! = null && sessionname! = ") {sessionobj .load ("s"); return sessionobj.getattribute (sessionname);}}
this.save = function (objId, attribute, sessionName) {var obj = null; (! document.getElementById (objId) = null) if obj = document.getElementById (objId) else return; var value = obj [attribute]; if (sessionname! = null && sessionname! = "") {sessionobj.setttribute (sessionname, value) sessionobj.save ("s")}}}
THISINIT ();} var session = new session (); // example: Enter anything in the text box! ! Click [Save] !!
and refresh the page! ! You can also delete the text box content! ! ! Click [load]