javascript - How to read a part of a line with DOM? -


I am familiar and know how to read the special tags of an HTML page.

But now, I want to read a part of a line in the JS file, and I do not know how to do it.

Here is the text of my java script:

  Var gblock = ''; VergaBatital; If (gblocktitle == undefined) {gblocktitle = 'title'; } Gblock + '' & lt; Div class = "g-block" & gt; '; Gblock + '' & lt; Div class = "g-block-title" & gt; '; Gblock + = gblocktitle; Gblock + '' & lt; / Div & gt; '; Gblock + '' & lt; Div class = "g-poem-block"> '; Gblock + '' & lt; Div class = "g-m1" & gt; Part1 & lt; / Div & gt; '; Gblock + '' & lt; Div class = "g-m2" & gt; Part2 & lt; / Div & gt; '; Gblock + '' & lt; Br style = "clear: both;" / & Gt; '; Gblock + '' & lt; / Div & gt; '; Gblock + '' & lt; Div class = "gfooter" & gt; '; Gblock + '' & lt; Div class = "gpoet" & gt; & Lt; A href = "#" & gt; AAAAAAAA & lt; / A & gt; & Lt; / Div & gt; '; Gblock + '' & lt; Br style = "clear: both;" / & Gt; '; Gblock + '' & lt; / Div & gt; '; Grblock + = '& lt; / Div & gt; '; Document.write (gblock);   

and part1 and part2

please help me read.

  var gblock = ''; VergaBatital; If (gblocktitle == undefined) {gblocktitle = 'title'; } Gblock + '' & lt; Div class = "g-block" & gt; '; Gblock + '' & lt; Div class = "g-block-title" & gt; '; Gblock + = gblocktitle; Gblock + '' & lt; / Div & gt; '; Gblock + '' & lt; Div class = "g-poem-block"> '; Gblock + '' & lt; Div class = "g-m1" & gt; Part1 & lt; / Div & gt; '; Gblock + '' & lt; Div class = "g-m2" & gt; Part2 & lt; / Div & gt; '; Gblock + '' & lt; Br style = "clear: both;" / & Gt; '; Gblock + '' & lt; / Div & gt; '; Gblock + '' & lt; Div class = "gfooter" & gt; '; Gblock + '' & lt; Div class = "gpoet" & gt; & Lt; A href = "#" & gt; AAAAAAAA & lt; / A & gt; & Lt; / Div & gt; '; Gblock + '' & lt; Br style = "clear: both;" / & Gt; '; Gblock + '' & lt; / Div & gt; '; $ (Gblock) .find ('gm 1.') html () .; Warning (. $ (Gblock) .find ('.gm1') html ());   

Try this U to use the JQuery library.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -