2. What is ‘this’ keyword in JavaScript?
3. Explain the working of timers in JavaScript? Also elucidate the drawbacks of using the timer, if any?
4. Which symbol is used for comments in Javascript?
//
5. What is the difference between ViewState and SessionState?
Session State contains information that is pertaining to a specific session (by a particular client/browser/machine) with the server.
It's a way to track what the user is doing on the site.. across multiple pages...amid the statelessness of the Web.
e.g. the contents of a particular user's shopping cart is session data. Cookies can be used for session state.
View State on the other hand is information specific to particular web page.
It is stored in a hidden field so that it isn't visible to the user.
It is used to maintain the user's illusion that the page remembers what he did on it the last time -
dont give him a clean page every time he posts back.
6. What is === operator?
7. Explain how can you submit a form using JavaScript?
<form name="myform" action="handle-data.php">
Search: <input type='text' name='query' />
<a href="javascript: submitform()">Search</a>
</form>
<script type="text/javascript">
function submitform()
{
document.myform.submit();
}
</script>
8. Does JavaScript support automatic type conversion?
9. How can the style/class of an element be changed
document.getElementById("MyElement").className = "MyClass";
10. Explain how to read and write a file using JavaScript?
JS EXT
fopen getscript path
str = fread(file,flength(file) ;
11. What are all the looping structures in JavaScript?
for (i = 0; i < cars.length; i++) {
text += cars[i] + "<br>";
}
12. What is called Variable typing in Javascript?
13 How to use angularJS to receive Json ?
14
No comments:
Post a Comment