0

Can you please tell me how to add text field in front of label in jquery mobile .enter image description here

There is two different types of text field in this image.How to implement this?

4

2 回答 2

1

Just you have to copy simple code to your website...

For input box:-

<div data-role="fieldcontain">
         <label for="text-12">Text input:</label>
         <input name="text-12" id="text-12" value="" type="text">
    </div>

For textarea:-

<div data-role="fieldcontain">
        <label for="textarea-12">Textarea:</label>
        <textarea cols="40" rows="8" name="textarea-12" id="textarea-12"></textarea>
    </div>

Keep that in mind the value of for="" and id="" of input box should be same...

For more details check out:- http://view.jquerymobile.com/1.3.1/demos/widgets/textinputs/

于 2013-06-13T11:11:41.340 回答
0

Use this code to add textfield

<label for="basic">Text Input:</label>
<input type="text" name="name" id="basic" value=""  />

Ref this docs to know more informations about JQM

http://jquerymobile.com/demos/1.2.1/docs/forms/textinputs/

于 2013-06-13T10:59:12.583 回答