code
Heris the javascript code.It works ffine but i would like to know what is the meaning of line this.SetData=SetData and next three lines after this(in bold) because when i remove them and try calling the functions via object I am not able to do so. Is it always necessary to do this when using function of these kind.
print("<html>
<head>
<Script language="JavaScript">
function MyClass()
{
var m_data = 15;
var m_text = "indian";
**this.SetData = SetData;
this.SetText = SetText;
this.ShowData = DisplayData;
this.ShowText = DisplayText;**
function DisplayData()
{
alert( m_data );
}
function DisplayText()
{
alert( m_text );
return;
}
function SetData( myVal )
{
m_data = myVal;
}
function SetText( myText )
{
m_text = myText;
}
}
var Obj1 = new MyClass();
var Obj2 = new MyClass();
Obj1.SetData( 30 );
Obj1.SetText( "Obj1: my cuntry" );
Obj2.SetData( 60 );
Obj2.SetText( "Obj2: my first javaScript progarm" );
Obj1.ShowData();
Obj1.ShowText();
Obj2.ShowData();
Obj2.ShowText();
</script>
</head>
</body>
</html>");
View Answers
Ads
Related Tutorials/Questions & Answers:
Code
Code
code for connecting c lang to database
code
code
how to write this in java
Advertisements
code
code
code for android sample program
code
code please provide
code for custom tags.by using currdate tag we need to get current date?please give me
code
code
code hi
I need help in creating a java
code that reminds user on a particular date about their festival.
i have no clue of how to do it..
am looking forward to seek help from you
code
the correct
code for a program.The output of the program is listed below...: {Block 5}
ADDRESS-3: {San Juan}
POST
CODE:{6745}
ENTER
CODE (XX TO stop)
CODE:{FF1}
QUANTITY:{2}
CODE:{TR4}
QUANTITY:{1}
CODE:XX
INVOICE FOR YOUR ORDER
Harry
code
code to create the RMI
client on the local machine:
import java.rmi.*;
public... : "+e);
}
}
}
However, when the preceding
code is executed it results... the correct
code
code
code i have four textboxes.whenever i click on up,down,left or down arrows then the cursor move to another textbox based on the key pressed.i want
code for this in javascript
code
line of
code to print the amount he should be paid as allowance
JAVA code For
JAVA
code For JAVA
code For "Traffic signals Identification for vehicles
stegnography code
stegnography code
code for the digital stegnographic technique for the encryption and decryption of image
jsp code
jsp code what are the jsp
code for view page in online journal
c code
c code c
code for this formula x=(y-0.22z-072)4;
where y=7.32 x=3.1 then ans x=23.9 end
code for this
c
code for this formula x=(y-0.22z-072)4;
where y=7.32 x=3.1 then ans x=23.9 can any one end
code
Source code
Source code source
code of html to create a user login page
c code
c code c
code for this formula x=(y-0.22z-072)4;
where y=7.32 x=3.1 then ans x=23.9 end
code
Code for Pattern
Code for Pattern
* * *
* * *
* * *
* *
Please write the
code of above program and please do not use in this string tokennizer, string buffer etc i mean to say that please use very simple method
Code for Pattern
Code for Pattern *
***
*
*
Please write the
code of above program and please do not use in this string tokennizer, string buffer etc i mean to say that please use very simple method
Code for Pattern
Code for Pattern
* *
* *
* *
* *
Please write the
code of above program and please do not use in this string tokennizer, string buffer etc i mean to say that please use very simple method
JSF code
need jsf
code that will populate combo box values from the database Hi, i'm new on JSf,I need jsf
code that will populate combo box values from the database when the form runs
code - Struts
code How to write the
code for multiple actions for many submit buttons. use dispatch action
jsp code
jsp code i want health management system project
code using jsp.its urgent
JAVA CODE
JAVA CODE JAVA SOURCE
CODE TO BLOCK A PARTICULAR WEB SITES(SOCIAL WEB SITE
java code
java code write a java
code to convert hindi to english using arrays
code for program
code for program hello,I am new to java and need to get the
code for a program,i've been trying all sorts of
code and nothing works any help would... enclosed in inverted commas thank you.
BlockquoteHARDWARE ITEMS
CODE
Code for Pattern
Code for Pattern 1
121
2342
45674
6789106
Please write the
code of above program and please do not use in this string tokennizer, string buffer etc i mean to say that please use very simple method