JQUERY get value div jquery - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution

get value of div using jquery


 168

Show ResultJQUERY


1

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<script>
$(document).ready(function(){
$("#btn1").click(function(){
alert("Text: " + $("#test").text());
});
$("#btn2").click(function(){
alert("HTML: " + $("#test").html());
});
});
</script>

</head>
<body>
<div id="test">Hello world!</div>
<button id="btn1">Show Text</button>
<button id="btn2">Show HTML</button>
</body>
</html>


By     Created   
The power of the user (%)
5%



The most helpful JQUERY solutions

plugin get client ip address using jqueryplugin get client ip address using jqueryJQUERY

Click to see more ...

  6.6K     1.5K

How to get client machine name or computer name with jquery?How to get client machine name or computer name with jquery?JQUERY

Click to see more ...

  5.7K     727

plugin detect country jqueryplugin detect country jqueryJQUERY

Click to see more ...

  2.6K     566

cookie jquerycookie jqueryJQUERY

Click to see more ...

  2.1K     391

show position on google map jqueryshow position on google map jqueryJQUERY

Click to see more ...

  1.7K     387

How to detect the version of IE browser using jquery ?How to detect the version of IE browser using jquery ?JQUERY

Click to see more ...

  1.2K     310

plugin convert thousands to K jqueryplugin convert thousands to K jqueryJQUERY

Click to see more ...

  1.1K     258

How to get top, right, left, bottom position of element div using jquery ?How to get top, right, left, bottom position of element div using jquery ?JQUERY

Click to see more ...

  1K     224

how to create a jquery plugin for converting date to days ago, month ago and year ago ?how to create a jquery plugin for converting date to days ago, month ago and year ago ?JQUERY

Click to see more ...

  1K     220

how to get ip address using jquery ?how to get ip address using jquery ?JQUERY

Click to see more ...

  1K     216