How do you assign object properties?
Answers were Sorted based on User's Feedback
Answer / m_xyz
var obj=new Object();
obj["age"]=18; or obj.age=18
Is This Answer Correct ? | 19 Yes | 0 No |
var obj=new Object();
obj["age"]=18; or obj.age=18
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / rubin thomas
var regiondb_stcty = new Object()
regiondb_stcty["Andaman and Nicobar"] = [ {value:"Port
Blair", text:"Port Blair"}];
u can do assign option elements with this object;
like a state city dyanmic population.
email me if u want thsi code
Is This Answer Correct ? | 1 Yes | 1 No |
What is difference between local and global scope in javascript ?
print the following using loop. 54321 4321 321 21 1
2 Answers Delhi Public School,
How is javascript different from java?
What is js injection?
what is a difference of subclass and main class
Do I need to install javascript?
How can I prevent others from reading/stealing my scripts or images?
Describe negative infinity in javascript?
hi i want validations for two drop down lists. when user enter to second list by skipping first list alert box should appear. <HTML><HEAD> <TITLE>drop down validation</TITLE> <script type="text/javascript"> function validateForm(){ if(document.ItemList.Item.selectedIndex==0) { alert("Please select item from first list."); document.ItemList.Item.focus(); return false; } return true; } </SCRIPT> </HEAD> <BODY> Please choose an item from the drop down menu: <form name="ItemList" method="post" action="asp.html" onsubmit="validateForm()"> <table width="100%" border="0"> <tr> <td width="135">Choose a username: </td> <td> <select name="Item"> <option value selected> SELECT </option> <option value>Apples</option> <option value>Oranges</option> </select> <table width="100%" border="0"> <tr> <td width="135">Choose a username: </td> <td> <select name="Item" onclick="validateForm()"> <option value selected> SELECT </option> <option value>Apples</option> <option value>Oranges</option> </select> <input type="submit" name="Submit" value="Submit"> </td></tr></table></form> </BODY> </HTML> please any body help me thanks
What is the statement to enable strict mode in javascript quiz?
How to write comment in JavaScript?
Explain export & import in javascript?