Buttons are standard HTML form elements that are enhanced by the button plugin
in the jQuery Mobile framework to make them finger friendly and also to look good in a wide variety of mobile devices. You can add buttons to your app by using the <button>
tag or the <input>
tag. You can also style the anchor element as a button by adding the data-role="button"
attribute to it. This recipe shows you how to dynamically add a button to a page using JavaScript and bind an action to this newly added button.
Copy the full code of this recipe from the code/04/dynamic-button
sources folder. You can launch this code using the URL http://localhost:8080/04/dynamic-button/main.html
.