How do I get html tag value (div) in javascript

后端 未结 7 671
抹茶落季
抹茶落季 2020-12-21 11:01

I have implemented this function (libphonenumber javascript )in a website http://www.phoneformat.com/

How do i get the value returned by this html tag. Whether Yes

7条回答
  •  -上瘾入骨i
    2020-12-21 11:55

    If you need to include HTML comments then consider using contents() method

    $('#mydiv').contents()

    Other wise html() method or even text() will be what you are looking for because val() purpose is for form elements ;)

提交回复
热议问题