I have this line of code:
<a href="#" id="inv_1" class="load_invoice">
I am trying to use Javascript to spit back only the integer to be used for the rest of my control. What is the best method to do so?
Would .split be used or a simple regex?
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.
I usually use ‘replace’ for such things:
http://www.w3schools.com/jsref/jsref_replace.asp
You can also use ‘split’:
http://www.w3schools.com/jsref/jsref_split.asp