我有使用chrome和safari的问题..点击按钮时日期选择器没有打开。我将压缩图像设置为按钮的背景 这是我的代码
HTML:
input type="button" id="startdate" src="../images/Calendar.png" class="actions-edit-task task-exp-callendar">
Jquery的:
$('#startdate').datepick({
onSelect : showStartDate
});
function showStartDate(dates) {
var sdate = dates[0];
taskStartDate = new Date(sdate.toDateString() + " " + $('#hourselector').val() + ":" + $('#minutselector').val() + " " + $('#ampmselector').text()).getTime();
}
CSS:
.actions-edit-task{
float: left;
padding: 5px;
margin: 5px 5px 0 5px;
}
.task-exp-callendar{
height: 20px;
width: 20px;
background-image: url('../images/Calendar.png');
}
提前致谢。
答案 0 :(得分:0)
你有两个课程输入了吗?
class="actions-edit-task task-exp-callendar">
将CSS / JS合并到一个类中,看看这是否有所不同。 Safari和Chrome是“未来的浏览器”,也许他们无法阅读这两个类。
HTML
<input type="button" id="startdate" src="../images/Calendar.png" class="combined-class">
CSS
.combined-class {
height: 20px;
width: 20px;
background-image: url('../images/Calendar.png');
float: left;
padding: 5px;
margin: 5px 5px 0 5px;
}