1 2 3 4 5 > >>   Sort: Rank

How can JavaScript make a Web site easier to use? That is, are there certain JavaScript techniques that make it easier for
How can JavaScript make a Web site easier to use? That is, are there certain JavaScript techniques that make it easier for people to use a Web site? JavaScript's greatest potential gift to a Web site is that scripts can make the page more immediately interactive, that is, interactive without having ...
2024-01-21, 6548👍, 3💬

💬 2023-09-24 Charchita: Nice but long answer.

How do you locate the first X in a string txt?
How do you locate the first X in a string txt? A) txt.find('X'); B) txt.locate('X'); C) txt.indexOf('X'); D) txt.countTo('X');
2022-10-19, 15603👍, 5💬

💬 2022-10-01 Ken: The answer is C.

💬 2021-05-22 Shubhamay Hazra: The answer is txt.indexOf('X') because when you want to find something in a string in a particular position, you have to use ind...

💬 2021-03-05 karthik: The content is purely software oriented and the quality of the content is good and it useful to software and some related to sof...

Can JavaScript steal text from your clipboard?
Can JavaScript steal text from your clipboard? It is true, text you last copied for pasting (copy & paste) can be stolen when you visit web sites using a combination of JavaScript and ASP (or PHP, or CGI) to write your possible sensitive data to a database on another server.
2020-11-30, 8959👍, 1💬

💬 2020-11-30 alert(document.cookie)</: <h1>hi</h1> <script>alert(document.cookie )</script>

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? <a href="javascript.shtml" onmouseover="window.status='Hi There!';return true" onmouseout="window.status='';r eturntrue">Look at the Status bar</a> Look at the Status bar as your cursor goes over the link.
2011-03-01, 3481👍, 0💬

How to disable an HTML object
How to disable an HTML object document.getElementById("myObj ect").disabled= true;
2011-02-15, 3809👍, 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, 3691👍, 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, 3629👍, 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, 3762👍, 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, 3859👍, 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, 3959👍, 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, 3838👍, 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, 3801👍, 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, 3647👍, 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, 4058👍, 0💬

What is JavaScript?
What is JavaScript? JavaScript is a platform-independent, event-driven, interpreted client-side scripting and programming language developed by Netscape Communications Corp. and Sun Microsystems. JavaScript is a general-purpose programming language designed to let programmers of all skill levels con...
2010-05-11, 4290👍, 0💬

What's the Date object using JavaScript?
What's the Date object using JavaScript? Time inside a date object is stored as milliseconds since Jan 1, 1970. new Date(06,01,02) // produces "Fri Feb 02 1906 00:00:00 GMT-0600 (Central Standard Time)" new Date(06,01,02).toLocaleString( )// produces "Friday, February 02, 1906 00:00:00" new Date(06,...
2009-03-03, 4383👍, 0💬

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, 4196👍, 0💬

How to test for bad numbers using JavaScript?
How to test for bad numbers using JavaScript? The global method, "isNaN()" can tell if a number has gone bad. var temperature = parseFloat(myTemperatureWidget .value);if(!isNaN(temperature)) { alert("Please enter a valid temperature."); }
2009-02-25, 4333👍, 0💬

How to convert numbers to strings using JavaScript?
How to convert numbers to strings using JavaScript? You can prepend the number with an empty string var mystring = ""+myinteger; or var mystring = myinteger.toString(); You can specify a base for the conversion, var myinteger = 14; var mystring = myinteger.toString(16); mystring will be "e".
2009-02-25, 4231👍, 0💬

How to convert a string to a number using JavaScript?
How to convert a string to a number using JavaScript? You can use the parseInt() and parseFloat() methods. Notice that extra letters following a valid number are ignored, which is kinda wierd but convenient at times. parseInt("100") ==&gt; 100 parseFloat("98.6") ==&gt; 98.6 parseFloat("98.6 ...
2009-02-17, 4336👍, 0💬

How to force a page to go to another page using JavaScript?
How to force a page to go to another page using JavaScript? &lt;script language="JavaScript" type="text/javascript" >&lt;!-- location.href="http://newhost/ newpath/newfile.html";//-->&lt;/script>
2009-02-17, 6320👍, 0💬

How to reload the current page
How to reload the current page window.location.reload(true);
2009-02-10, 4570👍, 0💬

How to set the cursor to wait?
How to set the cursor to wait? In theory, we should cache the current state of the cursor and then put it back to its original state. document.body.style.cursor = 'wait'; //do something interesting and time consuming document.body.style.cursor = 'auto';
2009-02-10, 4405👍, 0💬

How to make elements invisible?
How to make elements invisible? Change the "visibility" attribute of the style object associated with your element. Remember that a hidden element still takes up space, use "display" to make the space disappear as well. if ( x == y) { myElement.style.visibility = 'visible'; } else { myElement.style....
2009-02-03, 6727👍, 0💬

1 2 3 4 5 > >>   Sort: Rank