<< < 1 2 3 4 5 6 7 8 9 10 > >>   Sort: Date

Does JavaScript have the concept level scope?
Does JavaScript have the concept level scope? No. JavaScript does not have block level scope, all the variables declared inside a function possess the same level of scope unlike c, c++, and java.
2011-01-25, 4182👍, 0💬

How is JavaScript different from Java?
How is JavaScript different from Java? JavaScript was developed by Brendan Eich of Netscape; Java was developed at Sun Microsystems. While the two languages share some common syntax, they were developed independently of each other and for different audiences. Java is a full-fledged programming langu...
2010-05-11, 4154👍, 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, 4150👍, 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, 4138👍, 0💬

What does the EnableViewStateMac setting in an aspx page do?
What does the EnableViewStateMac setting in an aspx page do? Setting EnableViewStateMac=true is a security measure that allows ASP.NET to ensure that the viewstate for a page has not been tampered with. If on Postback, the ASP.NET framework detects that there has been a change in the value of viewst...
2010-11-23, 4134👍, 0💬

How to determine the state of a checkbox using JavaScript?
How to determine the state of a checkbox using JavaScript? Use the "checked" property of the checkbox object. For example: var checkedP = window.document.getElementById ("myCheckBox").checked;
2010-10-19, 4133👍, 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, 4133👍, 0💬

How do you convert numbers between different bases in JavaScript?
How do you convert numbers between different bases in JavaScript? Use the parseInt() function, that takes a string as the first parameter, and the base as a second parameter. So to convert hexadecimal 3F to decimal, use parseInt ("3F", 16);
2010-06-22, 4133👍, 0💬

What is the difference of decodeURI() and encodeURI()?
What is the difference of decodeURI() and encodeURI()? Many characters cannot be sent in a URL, but must be converted to their hex encoding. These functions are used to convert an entire URI (a superset of URL) to and from a format that can be sent via a URI. &lt;script type="text/javascript"> v...
2011-08-30, 4124👍, 0💬

What can JavaScript programs do?
What can JavaScript programs do? Generation of HTML pages on-the-fly without accessing the Web server. The user can be given control over the browser like User input validation Simple computations can be performed on the client's machine The user's browser, OS, screen size, etc. can be detected Date...
2010-07-20, 4110👍, 0💬

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.
2010-08-24, 4103👍, 0💬

What is the difference between a web-garden and a web-farm?
What is the difference between a web-garden and a web-farm? Web-garden - An IIS 6.0 feature where you can configure an application pool as a web-garden and also specify the number of worker processes for that pool. It can help improve performance in some cases. Web-farm - A general term referring to...
2010-10-12, 4096👍, 0💬

What is the eval() function?
What is the eval() function? The eval() method is incredibly powerful allowing you to execute snippets of code during exection. &lt;script type="text/javascript"> var USA_Texas_Austin = "521,289"; document.write("Population is "+eval("USA_"+"Texas_"+"Austin "));&lt;/script> This produces: Po...
2011-08-09, 4093👍, 0💬

How to Add Event Handlers?
How to Add Event Handlers? You can add an event handler in the HTML definition of the element like this: &lt;script type="text/javascript">&lt ;!--function hitme() { alert("I've been hit!"); } // --&gt; &lt;/script> &lt;input type="button" id="hitme" name="hitme" value="hit me" o...
2011-05-24, 4058👍, 0💬

How to create an object using JavaScript?
How to create an object using JavaScript? Objects can be created in many ways. One way is to create the object and add the fields directly. &lt;script type="text/javascript"> var myMovie = new Object(); myMovie.title = "Aliens"; myMovie.director = "James Cameron"; document.write("movie: title is...
2011-08-02, 4046👍, 0💬

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

How to set the focus in an element using JavaScript?
How to set the focus in an element using JavaScript? Use the "focus()" method of the element object: &lt;script> function setFocus() { if(focusElement != null) { document.forms[0].elements["my elementname"].focus();} } &lt;/script>
2010-10-19, 4044👍, 0💬

What's Prototypes for JavaScript?
What's Prototypes for JavaScript? Objects have "prototypes" from which they may inherit fields and functions. &lt;script type="text/javascript"> function movieToString() { return("title: "+this.title+" director: "+this.director); } function movie(title, director) { this.title = title; this.direc...
2011-08-23, 4036👍, 0💬

How to find radio button selection when a form is submitted?
How to find radio button selection when a form is submitted? &lt;script type="text/javascript"> function findButton() { var myForm = document.forms.animalForm; var i; for (i=0;i&lt;myForm.marsupial .length;i++) { if (myForm.marsupial[i].checked) { break; } } alert("You selected \""+myForm.ma...
2011-02-08, 4015👍, 0💬

How can JavaScript be used to personalize or tailor a Web site to fit individual users?
How can JavaScript be used to personalize or tailor a Web site to fit individual users? JavaScript allows a Web page to perform "if-then" kinds of decisions based on browser version, operating system, user input, and, in more recent browsers, details about the screen size in which the browser is run...
2010-07-27, 4000👍, 0💬

How about 2+5+"8"?
How about 2+5+"8"? Since 2 and 5 are integers, this is number arithmetic, since 8 is a string, it’s concatenation, so 78 is the result.
2010-11-16, 3997👍, 0💬

How to read and write a file using JavaScript?
How to read and write a file using JavaScript? I/O operations like reading or writing a file is not possible with client-side JavaScript.
2010-06-02, 3996👍, 0💬

How to hide JavaScript code from old browsers that does not support JavaScript?
How to hide JavaScript code from old browsers that does not support JavaScript? Use the below specified style of comments: &lt;script language=javascript> &lt;!-- javascript code goes here // --&gt; &lt;/script> or Use the &lt;NOSCRIPT> and &lt;/NOSCRIPT> tags and code the di...
2010-12-07, 3993👍, 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, 3993👍, 0💬

<< < 1 2 3 4 5 6 7 8 9 10 > >>   Sort: Date