4umi useful javascript

来源:百度文库 编辑:神马文学网 时间:2024/04/24 07:44:32
An Ode to Javascript
The language that made the machine talk to us
WhileArrayConwayFeatherFormMousetailSubstringSwirlXmlhttp
Back upHTMLCSSJavascriptRegex
ReloadGamesMirrorMusicWords
Welcome to our little treasure grove stuffed with scripted gems, developed and designed to utilize the power of Javascript to its full potential, while at the time degrading nicely and errorfree on machines where Javascript has been restricted or justdisabled. Has it ever been different? It may seem the interest of nerds and other rabble, but Javascript is known to run mission critical functions at computers controlling power plants, and it won‘t be long until you add an onmouseover event handler to your correspondence. The list of Reserved Javascript Words is a clear illustration of the mutual approach of human language and computer code. We ‘re talking to the machine in a vocabulary somewhere between our own and the bits and bytes, and why not? Computers are made by humans.
What ’s in a language?
Development of online technologies is expected to remain violent for the forseeable future, but it seems that since its introduction Javascript has kept the closest connection between the source and the experience, the author and the user. Applets, Flash, vectors all attempt to bring the content to life, but kill it in the process. Creating such programs requires very specific knowledge and tools, software that costs money, and search engine bots can‘t or won‘t index them!
The web to be accessible, must be a text-based web. There is a place for binary files, plugins and multicultimedia, but in the end the communication is between humans. Human code is readable code. Javascript is usually slower in operation than most alternative options, but this is easy to forgive and understand. It is downloaded as uncompressed as this very text, and all interpretation of the code statements, the setting of the actual switches, is left to the final stage. Once set, the possibilities of interaction with the page, the browser and the user are endless.
Javascript brings life to existing content, to raw text and HTML that every entity—from braille reader to search engine bot—has access to, without taking anything away. It is the natural extension. However, as all good things, it can be abused and misused, and mistakes are easily misunderstood, and sometimes lead to great frustration on the world wide wasp nest, the end user perspective must prevail, the aim must be clearly articulated and caution is advised. Integrity adds beauty to numbers and scripts alike.
Some scripts
These pages offer a few scripts which may help combine the useful with the inevitable. They are not all the libraries or factories or cut-and-paste scripts found at other sites, but perhaps a mixture trying some concepts and sparkling some ideas about solution-orientated coding. The eye of the beholder is teased and tested.
With the standards dom interface and methods as specified by the W3 Consortium, to make the scripts work in as many known and unknown browsers on as many platforms out there as possible, but open to more efficient alternatives where available, and a clear separation of look, feel and content, yet without losing grip. Practical reasons and unmodest wishes may sometimes dictate the use of a browser specific functionality, such as text selections, which are in no way standardized. The possibilities are much more interesting than the impossibilities.
CategoryFileTitleDescriptionSizeDate
BasicableTo script, or not?Instructions for enabling and disabling Javascript8.06 KB10 Jul ‘05
OtheractivexAbout ActiveXHow to deal with ActiveX controls on the web4.08 KB10 Jul ‘05
FormaddoptionAdd-an-optionHow to fill select lists with dynamically created options5.47 KB5 Aug ‘05
TimingalarmAlarm!A multimedia alarm clock4.77 KB29 Jul ‘05
TiminganimationAni-mateHow to animate at varying speeds2.37 KB10 Jul ‘05
BasicarrayArray functionsStandard and advanced array functions20.74 KB22 Jul ‘05
MathaverageDraw-a-curveHow to draw average curves in Javascript4.90 KB10 Jul ‘05
MathcalculatorCalculate…A practical scientific calculator6.09 KB6 Jul ‘05
BeautifulclipAdam clippedInteractive demonstration of the CCS clip property9.13 KB24 Jul ‘05
MousetailclockAnalogue clockAn analogue clock follows the mouse7.74 KB10 Jul ‘05
MousetailcometsThe comets comeEvade the comets that come after the mouse12.22 KB19 Jul ‘05
DynamiccontextmenuDouble your contextmenuHow to combine a scripted contextmenu with the default12.16 KB10 Jul ‘05
MathconvertConversion of measurementsConvert any measurement, however large, light or deep27.29 KB10 Jul ‘05
MathconvertromanRoman Number ConverterA small but fast and handsome conversion utility9.67 KB23 Jul ‘05
UsefulconverttemperatureTemperature Conversion2.70 KB19 Jul ‘05
MathconwayLife according to ConwayHow to script a cellular automaton: as a game16.29 KB8 Jul ‘05
TimingcountdownThe countdownHow to count down using setTimeout3.20 KB10 Jul ‘05
MathcurveCurveOnline tool for producing spiral and other curved forms5.21 KB6 Jul ‘05
DynamicdraggableDrag-a-tagHow to drag elements around the page4.26 KB10 Jul ‘05
MousetailelasticJump, stretch, bounceA spectacular mousetail, with strings attached6.53 KB24 Jul ‘05
TextencryptKey to encryptionHow to encrypt text messages using a unique key4.58 KB10 Jul ‘05
BasicerrorSyntax and errorsHow to make use of errors at runtime3.80 KB10 Jul ‘05
MousetaileyesEyesA pair of eyes keeps a close watch on your mouse5.83 KB10 Jul ‘05
MathfactorFactor-that-numberHow to find a number‘s factors and prime factors2.09 KB1 Aug ‘05
MousetailfeatherBlow-a-featherA feather flies on the wind in this elegant mousetail3.44 KB11 Jul ‘05
UsefulfilereadRead-a-fileHow to access the local Windows file system21.13 KB2 Aug ‘05
UsefulfilewriteWrite-a-fileHow to write to local files on Windows from Javascript9.48 KB11 Jul ‘05
UsefulfontView-a-font12.59 KB2 Aug ‘05
FormformCheck-a-boxHow to check ranges of checkboxes8.31 KB10 Jul ‘05
TexthiliteHighlight-a-textHow to highlight text the fast way6.37 KB28 Jul ‘05
DynamicimageswapSwap-an-imageHow to swap images2.54 KB15 Jul ‘05
DynamicimagewizardImage viewerOnline tool for examining images3.95 KB10 Jul ‘05
MorejscriptJScript or JScript?Standard and advanced array functions2.92 KB10 Jul ‘05
OthermenuNo titleHow to build a menu 6.60 KB9 Aug ‘05
Dynamicmenu1Revenge of the Menu BarHow to build a menu from a list18.05 KB19 Jun ‘05
BeautifulmoonThe moon todayThe moon displayed in its various phases5.13 KB29 Jul ‘05
BasicmousepositionPosition that mouseHow to detect the location of the mouse across browsers2.82 KB18 Jul ‘05
MousetailmousetailIt ‘s all in the tailA simple straightforward mousetail2.82 KB12 Jul ‘05
MathnumberformatNumbers formattedAdvanced number notation methods3.02 KB10 Jul ‘05
TextnumbertowordNumber to Word ConvertorHow to write out numbers into words6.55 KB2 Aug ‘05
BasicoptimizeLoop optimizationHow to make a script do the same thing twice as fast10.73 KB29 Jul ‘05
MousetailorbiterOrbitersShiny happy colours swirling around the mouse4.95 KB10 Jul ‘05
UsefulperiodictablePeriodic Table of the ElementsPeriodic Table of the Elements21.81 KB10 Jul ‘05
MathpiPIThe first 10000 digits of pi14.03 KB31 Jul ‘05
DynamicplodePlode!How to shatter an element into a million pieces3.52 KB10 Jul ‘05
MorereadurlRead-an-urlHow to load remote content into a page7.03 KB28 Jul ‘05
BasicrefWelcome to the machineIntroduction to objects, properties and methods19.25 KB10 Jul ‘05
TextregexRegular Expressions explainedAn overview of the Javascript RegExp object17.07 KB10 Jul ‘05
DynamicrightclickmenuRightclick menuHow to build a custom contextmenu3.27 KB10 Jul ‘05
Textrot13Rot13Rot13 under the loop5.32 KB23 Jul ‘05
DynamicscrollbarGet the scrollbar widthHow to measure the size of the GUI scrollbars3.93 KB10 Jul ‘05
TextselectSelected elementsHow to select text the cross-browser way9.07 KB17 Jul ‘05
UsefulshellPop the shellThe Popup method of the WScript.Shell object12.64 KB15 Jul ‘05
FormsliderSliderHow to create a functional slider element6.59 KB15 Jul ‘05
Otherslider2Windows’ own sliderHow to implement a native Windows slider control7.67 KB23 Jul ‘05
BasicsnipsBits and piecesA collection of code fragmanets6.43 KB10 Jul ‘05
DynamicsolarsystemSolar System ScriptHow to navigate the universe2.58 KB18 May ‘05
DynamicstarfieldStarfieldHow to fly through interstellar space4.09 KB8 Jul ‘05
BasicsubstringA string within stringsAn introduction into the substring method of strings8.36 KB10 Jul ‘05
MousetailswirlSwirling galaxyA swirling mousetail6.66 KB30 Jul ‘05
DynamictabTab-a-pageHow to create an interface of tabs11.92 KB10 Jul ‘05
TabletablehiliteRows across tablesHow to highlight rows in multiple tables simultaneously15.70 KB10 Jul ‘05
TabletablescrollSort ‘n’ ScrollHow to fix table headers and sort rows by column25.04 KB10 Jul ‘05
TabletablesortSort ‘n’ ScrollHow to sort table rows by column and fix the headers4.65 KB30 Jul ‘05
FormtelraamTelraamEen eenvoudig doch flexibel telraam3.97 KB10 Jul ‘05
OthertempNo title76.73 KB8 May ‘05
FormtextareaLine ’em upHow to number lines in a textarea3.47 KB10 Jul ‘05
DynamictextarearesizeResizable textareaHow to make a textarea resizable2.79 KB23 Jul ‘05
DynamictocA table of contentsHow to build a table of contents from heading elements7.11 KB11 Jul ‘05
TextunescapeEscape► How to write escaped characters1.25 KB24 Jul ‘05
DynamicwebWeave-a-webHow to draw curved and really complex shapes2.13 KB10 Jul ‘05
UsefulwindowBrowser sizeHow to measure various window sizes3.36 KB11 Jul ‘05
TimingworldclockWorldclockAll the time in the world5.84 KB10 Jul ‘05
UsefulxbmBeaMBrowser-based XBM image editor31.35 KB8 Jul ‘05
BasicxmlhttpRequesting XMLHttpHow to load remote content into a page26.07 KB4 Aug ‘05
But in haste, Cut and paste.
Reference
Putting it in context.
news:comp.lang.javascript - the expert Javascript newsgrouphttp://jibbering.com/faq - the comp.lang.javascript faqwww.ecma-international.org/publications/standards/Ecma-262.htm the standardMSDN - Microsoft‘s DHTML ReferenceJavascript 1.5 - Gecko DOM Reference