文档介绍:ExplorerusesJScript(referredtoinmenusas“ActiveScripting”),whichisMicrosoft’sdialectofJavaScriptOlderbrowsersdon’tsupportsomeofthenewerfeaturesofJavaScriptWewillassumemodernbrowsersupportEnablinganddisablingJavaScript:’tdoToprotectthevisitortoyourwebpages,youcan’t:ReadorwriteuserfilesHowever,JScriptonIEallowsASPscripting,.******@mmwormspreadsToturnoffactivescriptinginOutlookExpress,seehttp://support./support/kb/articles/Q192/8/,excepttodownloadanotherHTMLpageortosende-mailDeterminewhatothersitestheuserhasvisitedOpenaverysmall(lessthan100pxby100px)windoworanoffscreenwindow(exceptinIE)scapehasmuchbetterdebuggingtoolsthanIEMozillaSelectTools=>WebDevelopment=>scape6:SelectTasks=>Tools=>scape4:municator=>Tools=>scape:Typejavascript:Explorer:GotothePreferences...dialogandlookforsomethinglikeWebcontent=>ShowscriptingerroralertsAfterdebugging,testyourprograminIEIEisthemostpopularbrowser4NumbersInJavaScript,allnumbersarefloatingpointSpecialpredefinednumbers:Infinity,----theresultofdividinganegativenumberbyzeroNaN,(NotaNumber)--theresultofdividing0/0NaNisunequaltoeverything,evenitselfThereisaglobalisNaN()----thesmallest(closesttozero)representablenumber5StringsandcharactersInJavaScript,stringisaprimitivetypeStringsaresurroundedbyeithersinglequotesordoublequotesThereisno“character”typeSpecialcharactersare:\0NUL\bbackspace\fformfeed\nnewline\rcarriagereturn\thorizontaltab\vverticaltab\'singlequote\"doublequote\\backslash\xDDUnicodehexDD\xDDDDUnicodehexDDDD6SomestringmethodscharAt(n)Returnsthenthcharacterofastringconcat(string1,...,stringN)ConcatenatesthestringargumentstotherecipientstringindexOf(substring)Returnsthepositionofthefirstcharacterofsubstringintherecipientstring,or-1ifnotfoundindexOf(substring,start)Returnsthepositionofthefirstcha