我试图在我的日历上更改periode的颜色,我从mysql数据库获取periode
<html>
<head>
<script type="text/javascript">
var id;
function displayPeriode() {
id=15;
var urlString ="id="+id;
$.ajax
({
url: "http://localhost/duration.php",
type : "GET",
cache : false,
data : urlString,
success: function(response){
//convertir php array to javascript aaray
var ar = JSON.parse( response);
alert(ar[i]);
for(var i = 0; i < ar.length; i++) {
alert(ar[i]);
return [true, 'markperiod'];}
}
});
}
</script>
</head>
<body>
<div class="datepicker">
<div class="datepicker-header"></div>
并在css文件中
.markperiod {
background-color:red;
color: white;}
我想在成功函数
中为datepicker类添加颜色