Welcome Guest, Not a member yet? Register   Sign In
How to change the text on a button progamatically?
#4

You can use this code for change text on a button.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
    $("button").click(function(){
        $(".content").text("Test");
    });
});
</script>
<h2 class="content">This is a heading</h2>
<button>Click me to hide paragraphs</button>
Reply


Messages In This Thread
RE: How to change the text on a button progamatically? - by XtreemDeveloper - 01-08-2018, 11:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB