<< < 1 2 3 4 5   Sort: Date

What's Math Constants and Functions using JavaScript?
What's Math Constants and Functions using JavaScript? The Math object contains useful constants such as Math.PI, Math.E Math also has a zillion helpful functions. Math.abs(value); //absolute value Math.max(value1, value2); //find the largest Math.random() //generate a decimal number between 0 and 1 ...
2009-03-03, 4127👍, 0💬

How to have an element invoke a JavaScript on selection, instead of going to a new URL
How to have an element invoke a JavaScript on selection, instead of going to a new URL &lt;script type="text/javascript"> function pseudoHitMe() { alert("Ouch!"); } &lt;/script> &lt;a href="javascript:pseudoHitMe() ">hitme&lt;/a>
2008-12-30, 4121👍, 0💬

How to change style on an element?
How to change style on an element? Between CSS and javascript is a weird symmetry. CSS style rules are layed on top of the DOM. The CSS property names like "font-weight" are transliterated into "myElement.style.fontWeight". The class of an element can be swapped out. For example: document.getElement...
2009-02-03, 4112👍, 0💬

How do we get JavaScript onto a web page?
How do we get JavaScript onto a web page? You can use several different methods of placing JavaScript in you pages. You can directly add a script element inside the body of page. 1. For example, to add the "last updated line" to your pages, In your page text, add the following: &lt;p>blah, blah,...
2010-06-02, 3920👍, 0💬

nodeList is almost like an array except:
nodeList is almost like an array except: A) it has an item method. B) it is read-only. C) both a and b above. D) none of the above.
2010-08-28, 3876👍, 0💬

browser incompatibilities aside
Keeping browser incompatibilities aside, an event can be registered except: A) (input type="button" id="btn" name="btn" value="Click" onclick="handler()" /) B) document.getElementById("btn") .onclick= function() { alert("handler!"); } C) document.getElementById("btn") .addEventListener("onclick",han...
2010-08-28, 3759👍, 0💬

The join() function allows you to:
The join() function allows you to: A) create a string out of an array. B) create an array out of a string delimited by some character. C) join two strings. D) all of the above.
2010-08-28, 3744👍, 0💬

How to disable an HTML object
How to disable an HTML object document.getElementById("myObj ect").disabled= true;
2011-02-15, 3742👍, 0💬

How many times will the following loop print the word loop to the screen?
How many times will the following loop print the word loop to the screen? var index = 0; while (index < 3) { window.document.writeln("loop" );index++; } A) 1 B) 2 C) 3 D) 4
2010-08-28, 3724👍, 0💬

To change the presentation of an element
To change the presentation of an element, which of the following can be used? A) document.getElementById('elem1 ').style.propertyName= "value"; B) document.getElementById('elem1 ).className= "value"; C) Both a and b above D) None of the above
2010-08-28, 3667👍, 0💬

What does JavaScript null mean?
What does JavaScript null mean? The null value is a unique value representing no value or no object. It implies no object, or null string, no valid boolean value, no number and no array object.
2010-12-14, 3625👍, 0💬

Name the numeric constants representing max, min values
Name the numeric constants representing max, min values Number.MAX_VALUE Number.MIN_VALUE
2010-12-14, 3566👍, 0💬

How do you assign an object's property in JavaScript?
How do you assign an object's property in JavaScript? A) obj("age") = 30; B) obj.age = 30; C) Both a and b above D) None of the above
2010-08-28, 3562👍, 0💬

How to have the status line update when the mouse goes over a link?
How to have the status line update when the mouse goes over a link? &lt;a href="javascript.shtml" onmouseover="window.status='Hi There!';return true" onmouseout="window.status='';r eturntrue">Look at the Status bar&lt;/a> Look at the Status bar as your cursor goes over the link.
2011-03-01, 3418👍, 0💬

<< < 1 2 3 4 5   Sort: Date