我想了解使用ASP.Net Ajax的日曆控件的樣本客戶端代碼。這裏是來自asp.net網站的示例代碼。ASP.Net Ajax工具包客戶端代碼和JavaScript問題
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
</style>
<link href="http://ajax.microsoft.com/ajax/beta/0911/extended/Calendar/Calendar.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.js" type="text/javascript"></script>
<script src="http://ajax.microsoft.com/ajax/beta/0911/Start.debug.js" type="text/javascript"></script>
<script src="http://ajax.microsoft.com/ajax/beta/0911/extended/ExtendedControls.debug.js" type="text/javascript"></script>
<script type="text/javascript">
Sys.debug = true;
Sys.require(Sys.components.calendar, function() {
$("#bdate").calendar({});
});
</script>
</head>
<body>
<div style="width:1px;height:500px"></div>
<input type="text" id="bdate" />
</body>
</html>
根據一些文件,以下行加載javascript文件Sys.require())
。
$("#bdate")
用了jQuery找到ID爲 「bdate」 的對象。我不明白的休息,尤其是
.calendar({}),
尤其是({}),
function()
任何幫助或暗示的讚賞!!!!
Sys.require(Sys.components.calendar, function() {
$("#bdate").calendar({});
});