Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi..

i am new in java script so plz help me ...

how can i convert object value into string value using javascript?
Posted
Comments
harsh25 shah 30-Jun-11 3:00am    
thanks for rpy madam


var fd = parent.document.getElementById("txtlicfd1").value;
alert(fd);//show object
here txtlicfd1=textfield
how can i see fd variable value value?

You can just use the string object like that.What are you trying to convert.

<cpde>
var stringObj = new String ("string");


you could just use this stringObj it would give you the value only.

More on JS Strings visit =>
http://www.w3schools.com/jsref/jsref_obj_string.asp[^]

If you have number object you can use toString() method
something like -
var n= new Number(1);
n.toString();


Hope this helps.
 
Share this answer
 
Here is a link that can help you understand better.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900