如何在内容页面中使用jquery控件 [英] how to work with jquery controls in content page
问题描述
我试图在我的主内容页面中实现jquery日期选择器但是选择器没有工作任何人都可以建议解决方案。
< style>
.ui -datepicker {
背景:#333;
border:1px solid#555;
颜色:#EEE;
}
.ui-datepicker-calendar a.ui-state-default {background:cyan; }
.ui-datepicker-calendar td.ui-datepicker-today a {background:red; }
.ui-datepicker-calendar a.ui-state-hover {background:yellow; }
.ui-datepicker-calendar a.ui-state-active {background:lime; }
< / style>< / style>
< script src =jquery-1.7.jstype =text / javascript>< / script>
< script src =datetimepicker_css.jstype =text / javascript>< / script>
< script src =jquery -ui.jstype =text / javascript>< / script>
< script type =text / javascript>
$(function(){
$(input [id $ = fname])。datepicker({
showOn:'按钮',
buttonText:'显示日期',
buttonImageOnly:true,
buttonImage:'cal.gif',
dateFormat:'dd / mm / yy',
constrainInput:true
});
$( .ui-datepicker-trigger)。mouseover(function(){
$(this).css('cursor','pointer');
}) ;
});
< / script>
内容页面
i tried to implement jquery date picker in my master content pagebut the picker was not working any one can please suggest the solution.
<style>
.ui-datepicker {
background: #333;
border: 1px solid #555;
color: #EEE;
}
.ui-datepicker-calendar a.ui-state-default { background: cyan; }
.ui-datepicker-calendar td.ui-datepicker-today a { background: red; }
.ui-datepicker-calendar a.ui-state-hover { background: yellow; }
.ui-datepicker-calendar a.ui-state-active { background: lime; }
</style></style>
<script src="jquery-1.7.js" type="text/javascript"></script>
<script src="datetimepicker_css.js" type="text/javascript"></script>
<script src="jquery-ui.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("input[id$=fname]").datepicker({
showOn: 'button',
buttonText: 'Show Date',
buttonImageOnly: true,
buttonImage: 'cal.gif',
dateFormat: 'dd/mm/yy',
constrainInput: true
});
$(".ui-datepicker-trigger").mouseover(function () {
$(this).css('cursor', 'pointer');
});
});
</script>
content page
<input type="text" id="fname" style="background-color: #0099FF"><br>
<input type="image" src="Image/cal.gif" alt="Submit">
推荐答案
(function(){
(function () {
(input [id
("input[id
= fname])。datepicker({
showOn:'按钮',
buttonText:'显示日期',
buttonImageOnly:true,
buttonImage:'cal.gif',
dateFormat:'dd / mm / yy',
constrainInput:true
});
=fname]").datepicker({
showOn: 'button',
buttonText: 'Show Date',
buttonImageOnly: true,
buttonImage: 'cal.gif',
dateFormat: 'dd/mm/yy',
constrainInput: true
});
这篇关于如何在内容页面中使用jquery控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!