Skip to content
Related Articles

Related Articles

How to create a Text Input using jQuery Mobile ?

View Discussion
Improve Article
Save Article
  • Last Updated : 14 Dec, 2020

jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be a Text Input using jQuery Mobile.


  • First, we add the jQuery Mobile scripts needed for the project.

<link rel=”stylesheet” href=”” />
<script src=””></script>
<script src=””></script>

  • We can now start creating the text input that would be based on jQuery Mobile.

Example: In this example, we will create a text input area using jQuery Mobile. The data-clear-btn attribute is set to “true” to add a button for clearing the text in the input area.


<!DOCTYPE html>
    <link rel="stylesheet"
    <script src=
    <script src=
            Design a Text Input using jQuery Mobile
        <form style="width: 50%;">
            <label for="textInput1">
              Text Input Area:
            <input type="text" name="textInput1" 
                   id="textInput1" value=""
                   placeholder="Enter Text...">
            <label for="textInput2">
                Text Input Area with clear Text Button
            <input type="text" data-clear-btn="true"
                   name="textInput2" id="textInput2"
                placeholder="Enter Text...">


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!