Open In App
Related Articles

How to create a Text Input using jQuery Mobile ?

Improve Article
Save Article
Like Article

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...">


Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 14 Dec, 2020
Like Article
Save Article
Similar Reads
Complete Tutorials