Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have an html tag
HTML
<a id="up" name="section2" href="#section1"><img src="../../Styles/POS/images/up-arrow.png" /></a>


using the below code i can able to take the html element

JavaScript
var BillHtml = $('#up').html();

How to convert BillHtml to a string using jquery??
Posted
Comments
[no name] 7-Oct-15 3:11am    
var is a dynamic type in javascript. So whatever value you have it is in string. Secondly if you want then you can use toString()

var BillHtml = $('#up').html().toString();

1 solution

BillHtml.toString() will return a string.
 
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