Homework0
1、What are JavaScript browser sniffers?
Browser sniffing is a technique used in websites and web applications in order to determine the web browser a visitor is using, and to serve browser- appropriate content to the visitor.
JavaScript Browser Sniffer is a browser identifier written in JavaScript (EcmaScript) and released under the LGPL license. It will tell which browser, version and operating system you (the visitor) are using (it's like phpsniff, but in JavaScript).
2、Why are they so commonly used in javascripts?
Unfortunately browsers use different DOMs(may be incompatible), so JavaScript which works on one may not work on another. So it is not enough to have a vague understanding of the DOM for each browser.
Mechanisms exist to determine which browser a script in running in so that relevant code is used. And the JavaScript Browser Sniffer can help to detect which browser, version and operating system the visitors are using, and choose corresponding code for the it.
Homework1~5
Homework1:Hi There >>Homework2:Function >>
Homework3:Pop Ups >>
Homework4:Object >>
Homework5:Wizard Form >>
More Functions With Javascript(For Bonus)
- In homework2-function:The value from myAlert2 is a random integer from 1 to 100.
- In homework3-popups:Give some tips if you can't see the change of the status bar.
- In homework5-wizardForm:No only the age has the check, but also name and email. And focus on your wrong input text.
- In homework5-wizardForm:Result can be save/delete/show by php and MySQL.
Shoot GamePlay now >>