javascript - Getting the value basing on id -


I use a jquery code for this & lt; P & gt; With the code $ , I wanted to get the value within the tag itself, I had to do it only to use internal HTML.

Here is my sample code:

  & lt; P id = "name display" & gt; Sample name & lt; / P & gt;  

This is my internal HTML code that worked:

  document.getElementById ('nameDisplay'). Inner HTML  

I want to know how to use it jquery Thanks in advance.

or

$ ('# nameDisplay') . Text ()

on the difference between .text () and .html ( )


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -