简体   繁体   中英

jsp <input> value not being displayed with class form-control

I am generating HTML code using jsp and the html output looks like this:-

<input type="text" style="font-weight:bold; background-color: orange; color: blue;" name="req_hallname" class="form-control" title="Conference Hall Requested" value="CIG-VC">

wherein the value="" is filled with CIG-VC from the jsp code .

This value of CIG-VC is NOT visible when I am using class="form-control" . If I delete the class="form-control" definition, the input field IS visible with value but the formatting gets spoilt.

Here is the image of both situations

在此处输入图片说明

Please advise how to overcome this.

You can Use:

 <div class="form-group" >
  <label class="control-label col-sm-2" for="conference">Conference Hall Requested 
   :
  </label>
     <div class="col-sm-8"> 
      <input id="conference" type="text" style="font-weight:bold; background-
         color:orange; color: blue;"  name="req_hallname" value="CIG-VC"/>
     </div>
 </div>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM