javascript - Show an individual part of a string as output -
This is my javascript code. I have the li
tag in javascript
I just want to get the price using How can I do this?
Javascript
var s = " First LI I want to show as first
and second link
as output. Thank you.
With the help of jQuery this is not easy:
<<>> gt ; Var str = '& lt; Div & gt; First & amp; Lt; / Li & gt; & Lt; Li & gt; Second LIT & lt; / Li & gt; & Lt; / Div & gt; ', first = $ (' li: eq (0) ', str) .text (), // "first LI" second = $ (' li: eq (1) ', str) .text (); // "get another" console.log (first, second);
Comments
Post a Comment