Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
316 views
in Technique[技术] by (71.8m points)

bootstrap 模式框启动问题?

1、通过a标签,触发一个bootstrap的模式框。

<a data-toggle="modal" href="modifyShield.jsp?shield_id=<%=u.getRoom()%>" data-target="#modal">更改</a>

2、想把modifyShield.jsp的内容显示在modal-body里面,这需要如何配置?

<form  class="form-horizontal" id="modal">
        <div class="control-group">
             <label class="control-label">服务名称:</label>
             <div class="controls">
                 <span id="showMsg" style="color: red">server_name</span>
             </div>
         </div>
         <div class="control-group">
             <label for="inputEmail" class="control-label" style="width:8%">时间段:</label>
             <div class="controls">
                 <input class="form-control" id="beginStr" type="text" value="<%= start_time%>" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" readonly />到<input class="form-control" id="endStr"  type="text"  value="<%=end_time%>"onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" readonly />
             </div>
         </div>
         <div class="form-actions" style="padding-left: 180px;">
             <input class="btn btn-primary" type="button" value="? 返回" onclick="location.href='shieldServer.jsp'">&nbsp;&nbsp;
            <input type="button" class="btn btn-primary" id="shield_button" value="操作" onclick="shield()" />
         </div>
</form>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

给模态框一个id,然后给a标签一个onclick事件。事件中写$("#id").modal()


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.8k users

...