On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
iPhone iOS 6 Development Essentials
eBook
$12.99 (eBook)
$29.99 (Print)
eBookFrenzy.com
RHEL 6 Essentials
eBook
$9.99
eBookFrenzy.com
Your browser does not support iframes
Your browser does not support iframes
The JavaScript FAQ
Prev
Home
Next
Javascript FAQ - Table of Contents
Javascript General Questions
JavaScript Essentials
eBook
$8.99
eBookFrenzy.com
Why this FAQ?
What is JavaScript?
What can JavaScript programs do?
What can't JavaScript programs do?
What browsers support JavaScript?
What JavaScript versions are there?
Where can I get JavaScript documentation?
How do I print JavaScript output?
How do I insert comments in JavaScript code?
How do I hide JS code from old browsers that do not support JavaScript?
If the user's browser cannot execute JS code, can I display a warning for the user?
Can I include JavaScript code from external JS files, rather than embedding all my scripts within HTML pages?
What reserved words are there in JavaScript?
Javascript Navigation Enhancement
How do I code a select menu with hyperlinks to different pages?
Can I make a button on my page work as a hyperlink to another page?
Can I make a button on my page work as the browser's
Back
button?
Can I make a button on my page work as the browser's
Forward
button?
Can my script access the query string in the current URL?
Can I pass parameters from one page to another?
How do I search for a particular text string on the page?
JavaScript Numbers
What types of numbers can I use in JavaScript code?
How do I handle mathematical constants in JavaScript?
Is there a way to use octal and hexadecimal values in JavaScript?
How do I convert numbers to strings?
How do I convert strings to numbers?
How do I convert a number to a different base?
Is there a way to test whether a particular variable holds a number or a string?
What arithmetic operations are supported in JavaScript?
What mathematical functions are supported in JavaScript?
How do I generate random numbers?
How can I round a number to
n
decimal places?
Sometimes JavaScript computations seem to yield "inaccurate" results, e.g. 0.362*100=36.199999999999996. How can I avoid this?
Javascript Strings
How do I insert quotes in strings?
How do I extract substrings from strings?
How do I convert strings to URL-encoding?
How do I convert strings from URL-encoding?
How do I convert numbers to strings?
How do I convert strings to numbers?
How do I convert a number to a string representing that number in a non-decimal number system?
Is there a way to test whether a particular variable holds a number or a string?
See also
Searching for text
Javascript Dialogs
How do I generate an alert message from JavaScript?
How do I generate an OK/Cancel dialog box from JavaScript?
How do I generate a user prompt from JavaScript?
What value does
prompt()
return if the user clicked the
Cancel
button?
How do I invoke the browser's
Find
dialog from JavaScript?
How do I invoke the browser's
Add Favorite
dialog?
JavaScript Windows
How do I open a new browser window?
How do I close a window?
How do I resize a window?
How do I maximize a window?
How do I write script-generated content to another window?
How do I test whether my other window is still open?
How do I change another window's title, that is, the content of title bar at the top of the window?
Javascript Frames
Is my page framed (loaded in a frameset) or is it in the browser's top-level window?
Bad boys from another website load my page into their frameset. How can I break out of the frameset?
Can I update two (or more) frames at a time?
See also
External files within layers
.
Javascript Forms
How do I validate the form input before sending it to the server?
Can I save space in my form by getting more than one input value from just one field?
Will my form be submitted when the user presses the Enter key?
How do I disable a radio button (making it not selectable)?
Javascript Layers
Can I display an external HTML file as part of my page?
How do I create a new layer from JavaScript?
How do I delete a layer using JavaScript?
Javascript Images
How do I change an image when the user's mouse points at it?
How do I change an image when the user clicks on it?
Can I create "pressable" buttons with images?
Javascript Mouse Events
What event properties can I use to analyze mouse events?
How do I check whether the user clicked the left or right mouse button?
Can I disable the Windows context menu that normally shows up when the user clicks the right mouse button?
Can I disable the right-click menu for a particular image, while enabling the normal right-click menu for all other parts of my page?
How do I detect mouse events with Ctrl, Alt, and Shift keys?
Can I disable the default browser response for Shift-click?
See also
OnMouseOver
and
OnMouseDown
Javascript Colors
How do I change the document's background color?
How do I change the document's text color and link colors?
How do I convert RGB values of a color to a hexadecimal string?
How do I convert a hex color string (e.g. "FFFFCC") to numeric RGB values of the same color?
What color names are supported by JavaScript?
Javascript File Access
How do I read a file into a JavaScript variable?
How do I write a file from JavaScript?
See also
Cookies
for information on cookie files.
Javascript Dates and Time
How do I write a clock program in JavaScript?
How do I determine the week day for a given date?
Is JavaScript code vulnerable to the Year 2000 problem?
See also
Clock bookmarklet
Javascript Cookies
How do I set a cookie from JavaScript?
How do I read a cookie with a given name?
How do I delete a cookie with a given name?
How do I test whether cookies are enabled in the user's browser?
Where are cookie files actually stored on the hard disk?
Javascript Client Information
How do I detect the browser name (vendor)?
How do I detect the browser version?
How do I detect the operating system on the client machine?
How do I get the screen size on the client machine?
How do I get the browser window size?
Javascript Bookmarklets
What's a bookmarklet?
What browsers support bookmarklets?
What's the maximum length of bookmarklet code?
Bookmarklet example: Calculator
Bookmarklet example: Clock
Can I have a JavaScript interpreter bookmarklet?
Javascript Sound
What browsers can execute scripts that play sound?
Can I play a sound file without using JavaScript?
How do I write a JavaScript function that plays a sound file?
How do I write a JavaScript function that stops playing sound?
Can I play a sound onMouseOver?
How do I preload a sound file?
How do I set a background sound on a Web page?
Which formats of sound files can I play on my Web page?
Javascript Error Handling
Can I suppress JavaScript error messages?
Can I set up my own JavaScript error handler?
Can I change the active JavaScript error handler?
(
Demo
)
Index
JavaScripter.net
.
Copyright
© 1999-2006, Alexei Kourbatov
The JavaScript FAQ
Prev
Home
Next
Mirrored with kind permission of Alexei Kourbatov
Design by Interspire