Master page and jquery
1.download latest jqury http://jquery.com/download/
Site.Master
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="KLSTest.Site" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type=.min.js") %>"></script>
<script type=.custom/jquery-ui.min.js")%>"></script>
<script type=.custom/zh-CN/jquery.ui.datepicker-zh-CN.js")%>"></script>
<script type="text/javascript" src="<%=ResolveClientUrl("~/Script/common_ui.js")%>"></script>
<link rel=.custom/jquery-ui.min.css")%>" />
<asp:ContentPlaceHolder ID="scripts" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form runat="server">
<div>
<asp:ContentPlaceHolder ID="bodyContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
Child Page
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DatePickerTest.aspx.cs" Inherits="KLSTest.DatePickerTest" %>
<asp:Content ID="Content1" ContentPlaceHolderID="scripts" runat="server">
<script type="text/javascript">
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="bodyContent" runat="server">
<asp:TextBox ID="dateSelect" runat="server" CssClass="jDatePicker"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
</asp:Content>
DatePicker-zh-CN
jQuery(function ($) {
$.datepicker.regional['zh-CN'] = {
closeText: '关闭',
prevText: '<上月',
nextText: '下月>',
currentText: '今天',
monthNames: ['一月', '二月', '三月', '四月', '五月', '六月',
'七月', '八月', '九月', '十月', '十一月', '十二月'],
monthNamesShort: ['一', '二', '三', '四', '五', '六',
'七', '八', '九', '十', '十一', '十二'],
dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
dayNamesShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
dayNamesMin: ['日', '一', '二', '三', '四', '五', '六'],
weekHeader: '周',
dateFormat: 'yy-mm-dd',
firstDay: ,
isRTL: false,
showMonthAfterYear: true,
yearSuffix: '年'
};
$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
});
DatePicker Initalization common_ui.js
$(function () {
/*-------------------- Date Picker --------------------------------------------*/
/*---- how to use: <asp:TextBox ID="TextBox1" runat="server" CssClass="jDatePicker"></asp:TextBox>---*/
if (!$('.jDatePicker').hasClass('readonly_submit')) {
$('.jDatePicker').addClass('readonly_submit');
}
$('.jDatePicker').datepicker({
showButtonPanel: true,
beforeShow: function (input) {
setTimeout(function () {
var buttonPane = $(input)
.datepicker("widget")
.find(".ui-datepicker-buttonpane");
$("<button>", {
text: "清除",
click: function () {
$.datepicker._clearDate(input);
}
}).appendTo(buttonPane).addClass("ui-datepicker-clear ui-state-default ui-priority-primary ui-corner-all");
}, );
},
onChangeMonthYear: function (year, month, instance) {
setTimeout(function () {
var buttonPane = $(instance)
.datepicker("widget")
.find(".ui-datepicker-buttonpane");
$("<button>", {
text: "清除",
click: function () {
$.datepicker._clearDate(instance.input);
}
}).appendTo(buttonPane).addClass("ui-datepicker-clear ui-state-default ui-priority-primary ui-corner-all");
}, );
}
});
/*-------------------- Input : Readonly but can be submit --------------------------------------------*/
/*---- how to use: <asp:TextBox ID="TextBox1" runat="server" CssClass="readonly_submit"></asp:TextBox>---*/
$('.readonly_submit').on('paste', function (e) { e.preventDefault(); return false; });
$('.readonly_submit').on('keydown', function (e) { e.preventDefault(); return false; });
$('.readonly_submit').attr('autoComplete', 'off');
});
Master page and jquery的更多相关文章
- Adding a WebPart to a SharePoint 2013 Master Page 分类: Sharepoint 2015-07-08 01:03 7人阅读 评论(0) 收藏
On SharePoint 2013 you can not add the Web Parts to the master page the same way of 2010. Please use ...
- 通过SharePoint Designer对SharePoint 2010的Master Page进行自定制
1:需要在对应的SiteCollection 和 Site 中开启Publishing的服务 2:在Designer中创建自己的Master Page,进行对原始v4.master代码进行复制,和修改 ...
- sharepoint 2010 页面添加footer方法 custom footer for sharepoint 2010 master page
转:http://blog.csdn.net/chenxinxian/article/details/8720893 在sharepoint 2010的页面中,我们发现,没有页尾,如果我们需要给页面添 ...
- 转载 SharePoint 2013配置Master Page and Page Layout
转载原地址: http://www.cnblogs.com/huangjianwu/p/4539706.html 涉及到的内容是关于SharePoint 2013如何部署自定义的母版页和布局页. 进入 ...
- 【Sharepoint】CSS与Master Page的开发与部署
一.CSS的开发与部署相对比较简单,先是要上传CSS文件到样式库中,然后在页面模板中将上传的自定义CSS样式文件设置为所有文件的默认css文件.下面详细的介绍CSS文件的开发与部署过程. 1.编写自定 ...
- 自定义SharePoint2013 master page
SharePoint uses templates to define and render the pages that a site displays. The structure of a Sh ...
- SharePoint 2013 Deploy Master Page And Page Layout
2013年9月27日的一篇随笔,其实也是自己编写的部署文档,由于客户是HK的,所以描述部分是用英文. 涉及到的内容是关于SharePoint 2013如何部署自定义的母版页和布局页. First, L ...
- How to Change Master Page @ Run-time
This tip will give complete knowledge of how to change master page, render controls and accessing it ...
- Creating a New Master Page in SharePoint 2013
Creating a New Master Page in SharePoint 2013 This article explains how to create a Master Page in S ...
随机推荐
- Jfinal中手动提交/回滚 事物
在Jfinal中有个Tx类为事物声明类 在方法或controller上面加@Before({Tx.class})即可,可是这样并不能满足有的业务场景 下面是今天写的手动提交的事物处理方法,希望对大家有 ...
- sublime 3 user Settings
{ "auto_complete": true, "auto_complete_delay": 50, "auto_complete_size_lim ...
- jQuery获取Ajax函数的返回值
参考自: http://blog.csdn.net/crx05/article/details/7362252 function test() { var myText = ""; ...
- .net 实现Office文件预览,word文件在线预览、excel文件在线预览、ppt文件在线预览
转自源地址:http://www.cnblogs.com/GodIsBoy/p/4009252.html,有部分改动 使用Microsoft的Office组件将文件转换为PDF格式文件,然后再使用pd ...
- ckeditor简单的演示
先把ckeditor文件添加到项目中 然后在页面上引用 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml& ...
- IE10以下的IE浏览器在form表单提交、a标签等场景下,接收application/json类型的响应时,会提示是否要下载该json文件
IE10以下的IE浏览器并不支持application/json这种response格式,所以需要在服务端先将对象转成json字符串然后,设置Content-Type为text/html的类型,再返回 ...
- Python 基础 - 统计文本里单词的个数以及出现的次数
# -*- coding:utf-8 -*- #author:V def tol (file1,gui): #写一个方法,定义文件,or 匹配规则 import re patt = re.compil ...
- JSP页面以及简单的指令
JSP(Java Server Pages)是指: 在HTML中嵌入Java脚本语言 由应用服务器中的JSP引擎来编译和执行嵌入的Java脚本语言命令 然后将生成的整个页面信息返回给客户端 页 ...
- poj1006-Biorhythms(中国剩余定理)
一,题意:右上角中文.二,思路: 1,由题意得出方程组 2,利用中国剩余定理求解 3,求出最小正整数三,步骤: 1,由题意得出方程组 (n+d) % 23 = p ; (n+d) % 28 = e ; ...
- poj2115-C Looooops(扩展欧几里德算法)
本题和poj1061青蛙问题同属一类,都运用到扩展欧几里德算法,可以参考poj1061,解题思路步骤基本都一样.一,题意: 对于for(i=A ; i!=B ;i+=C)循环语句,问在k位存储系统中循 ...