Priti's Technical Corner

February 7, 2009

Javascript questions

Filed under: Interview — Tags: , — pritisolanki @ 5:07 am

Question 1:  What is difference between createElement() and createTextNode().
Answer 1: createElement() function will create element of type specified where as createTextNode() Creates a text node given the specified string.

Question2:  Print today’s date in javascript.
Answer 2:
var current_date=new Date();
alert(current_date.getDate());

Question3:  How to submit two forms on a single page?
Answer3:
document.forms[0].submit();
document.forms[1].submit();

Question 4: How to identify client’s browser name in javascript?
Answer 4: navigator.appName.

Question 5: What is Jquery?
Answer 5: jQuery is a lightweight JavaScript library that emphasizes interaction between JavaScript and HTML.

Question 6: How to read XML tags in javascript?
Answer 6: getelementByTagName() .

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: