The following Javascript code:
o_value.html();
give me
<span id="legaloffice_city_value">some text</span>
All that I want now is to modify, javascript code, to just get: legaloffice_city_value. What can I do?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
working example: http://jsfiddle.net/6wUsT/
the reason that we are using the
[0]part here is that the jqueryfind()function will return a collection of all matched elements according to the selector provided (in our case, thespantag name).so we should use the indexer to access our item inside the collection.
give it a try and let me know