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

    asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

    jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

    sql server ce - Is there some way to make sqlce3.5 and 4.0 co-exist in the C# project -