小黑小波比.bootstarp弹出提示框实现

模板tpl

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" 
					aria-labelledby="myModalLabel" aria-hidden="true">
					<div class="modal-dialog">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" 
								data-dismiss="modal" aria-hidden="true">
								×
							</button>
							<h4 class="modal-title" id="myModalLabel">
								提示
							</h4>
						</div>
						<div class="modal-body">
							验证成功!
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-primary" 
							data-dismiss="modal">确定
						</button>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal -->
		</div>

客户端js

_('#myModal').modal('show');
这里激发提示框

id为myModal

你可能感兴趣的:(JavaScript,bootstrap,提示框,小黑小波比)