Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery click

<script>
$(document).ready(function(){
    $("#btn-txt").click(function(){
    	var ptext = $("#my-para").text();
        alert(ptext);
    });
});
</script>
<button type="button" id="btn-txt">Get Text Content</button>
<p id="my-para">This is a paragraph to Show jQuery text method.</p>
Source by tutorialdeep.com #
 
PREVIOUS NEXT
Tagged: #jquery #click
ADD COMMENT
Topic
Name
7+2 =