各位大大好:
想請問 ClockPicker要怎麼跑出來,我放網頁都無法點出時鐘- -? 請問像bootstrap語法要怎麼寫入mysql的資料庫呢? 也是跟平常用html一樣嗎?謝謝
以及欄位要如何縮小,我看教學的網頁欄都會縮短..
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link rel="stylesheet" href="http://www.ee.nsysu.edu.tw/key/bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="http://www.ee.nsysu.edu.tw/key/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/clockpicker/0.0.7/bootstrap-clockpicker.min.css">
<script src="http://www.ee.nsysu.edu.tw/key/bootstrap/js/jquery.min.js"></script>
<script src="http://www.ee.nsysu.edu.tw/key/bootstrap/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clockpicker/0.0.7/bootstrap-clockpicker.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".change").each (function(){
$(this).on("click",function(event){
var s=$(this).attr("value");
$("h5").text("日期:"+s);
alert($(this).attr("value"));
});
});
});
$('.clockpicker').clockpicker({
placement: 'top',
align: 'left',
donetext: 'Done'
});
</script>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">Open modal for @mdo</button>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">New message</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="recipient-name" class="col-form-label">Recipient:</label>
<input type="text" class="form-control" id="recipient-name">
</div>
<div class="form-group">
<label for="message-text" class="col-form-label">Message:</label>
<textarea class="form-control" id="message-text"></textarea>
</div>
</form>
</div>
<div class="input-group clockpicker" >
<input type="text" class="form-control" value="09:30">
<span class="input-group-addon">
<span class="glyphicon glyphicon-time"></span>
</span>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Send message</button>
</div>
</div>
</div>
</div>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css"href="http://www.ee.nsysu.edu.tw/key/bootstrap/dist/bootstrap-clockpicker.css">
<link rel="stylesheet" type="text/css"href="http://www.ee.nsysu.edu.tw/key/bootstrap/dist/bootstrap-clockpicker.min.css">
<script type="text/javascript" src="http://www.ee.nsysu.edu.tw/key/bootstrap/dist/bootstrap-clockpicker.js"></script>
<script type="text/javascript" src="http://www.ee.nsysu.edu.tw/key/bootstrap/dist/bootstrap-clockpicker.min.js"></script>
<script type="text/javascript">
$('.clockpicker').clockpicker();
</script>
</head>
<div class="input-group clockpicker">
<input type="text" class="form-control" value="12:34">
<span class="input-group-addon">
<span class="glyphicon glyphicon-time"></span>
</span>
</div>
</html>
1.你沒有 body block,雖然現代 browser 是會幫你加,不過不建議。
2.bootstrap 需要 jQuery,你沒載入。