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

    Popular posts from this blog

    Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

    multithreading - PhantomJS-Node in a for Loop -

    c++ - MATLAB .m file to .mex file using Matlab Compiler -