<!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$("#datepicker").datepicker();
$("#datepicker").datepicker({
onSelect: function(dateText, inst) { alert('weiwei'); }
});
});
</script>
</head>
<body style="font-size:62.5%;">
<input type="text" id="datepicker">
</body>
</html>我在选择日期的时候并不能弹出weiwei字样,估计是这行没有执行还是怎么回事,onSelect: function(dateText, inst) { alert('weiwei'); }
请教大家了。
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
//先执行这段
$("#datepicker").datepicker({
onSelect: function(dateText, inst) { alert('weiwei'); }
}); $("#datepicker").datepicker();
});
</script>
</head>
<body style="font-size:62.5%;">
<input type="text" id="datepicker">
</body>
</html>