使用html2canvas.js实现页面截图 由于最近项目需求,需要实现html页面截图,经过查资料,找到了这个东东html2canvas,刚开始截出来的图片,空白、模糊、图片不完整,各种问题,但幸好有各路大神的见解,把问题解决了,以下是我写的一个demo,仅供大家参考哦1、html页面引入两个js,html2canvas.js里面不用改东西哦2、css样式:.main{width:100%; backgro
css3实现渐变、阴影、超出指定文本省略号显示等一些效果 1.实现边框圆角 :border-radius:5px2.实现文字阴影 :text-shadow: .1em .1em .1em #aaa 带有模糊效果的阴影 text-shadow: 3px 3px #aaatext-shadow:-1px -1p x white,1px 1px #333立体文本特效text-shadow:1px 1
jquery滚动条插件nanoscroller的应用 1.引入样式 nanoscroller.css2.两个js文件,一个jquery库,一个jquery.nanoscroller.js3.可以自己设置的样式 .nano { background: #bba; width: 300px; height: 300px; } .nano .content { padding: 10px; } .nano .pane {
js省市二级联动 var where = new Array(35); function comefrom(loca, locacity) { this.loca = loca; this.locacity = locacity; } where[0] = new comefrom("请选择省份", "请选择城市"); where[1] = new comefr
浏览器的兼容问题 1.在IE6浏览器里有些div的宽度会明显偏高。 解决方法:在div样式里加overflow:hidden2.在IE6、IE7、IE8里,文本框设置了宽度时,在其输入的字并不是上下居中,而是偏上。 解决方法:在样式里加line-height就可以啦,一般line-height的高度和文本框的高度一致。3.IE6双边距,块属性标签float之后,又有margin的情况下,IE6里
js 登录注册 注册页面 注册 .content { width: 400px; height: auto; margin: 0 auto; border: 1px solid #CCC; text-align: cente
js 全选、反选、全不选、动态添加行、动态删除行 //动态添加行 function AddLine() { var ul = document.getElementById("content_ul"); var checkbox = document.createElement("input"); checkbox.setAttribute("type", "
Linq To Sql常用方法使用总结 准备工作:数据表:Table1 ID int PKCol1 varchar(50)Col2 int======================================Table2ID int PKoID int FKRemarks
GridView中根据CheckBox选中的行取出某列的值及计算数据列的总数 根据CheckBox选中的行取出某列的值:for (int i = 0; i { CheckBox ckb = (CheckBox)this.GridView1.Rows[i].Cells[0].FindControl("CheckBox1"); if (ckb.Checked) {
asp.net Calender控件的应用 前台: <asp:ImageButton ID="ImageButton1" runat="server" Width="25px" Height="25px" ImageUrl="~/Calender.png" onclick="ImageButton1_Click" />
dataList的嵌套使用 前台: onitemdatabound="DataList1_ItemDataBound" RepeatColumns="3" RepeatDirection="Horizontal">
javascript dom基础 一.节点(node)层次1.Document:最顶层的节点,所有其他节点都是附属于它的2.DocumentType:DTD引用的对象表示形式,不能包含子节点3.DocumentFragment:可以向document一样保存其他节点4.Element:表示起始标签和结束标签之间的内容,唯一可以同时包含特性和子节点的节点类型5.Attr:代表一对特性名和特性值,不能包含子节点
asp.net GridView和下拉菜单DropDownList结合 后台代码:using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;
GridView里隔行变色 $(function () { var mytr = $('#GridView1 tr'); for (var i = 1; i if (i % 2 == 0) { $('#GridView1 tr:eq(' + i + ')').addClass('classoush
GridView和下拉菜单DropDownList结合 后台代码:using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;
js+jquery注册信息的基本验证 $(function () { //当焦点移出txtUserName触发的事件 $('#txtUserName').blur(function () { var username = $.trim($(this).val()); if (username == "") {
treeview的使用 1.找不到TreeNode类 使用TreeView,需要添加namespace:using Microsoft.Web.UI.WebControls;2.遍历TreeView节点下面是一个利用TreeView控件生成树状导航的示例。可以无限生成多级菜单。树型结构表Para_ItemItem_ID(节点ID) Item_Name(节点名) Parent_ID(父结点I
xml导入和导出 将数据库里的数据导出到xml文件:string str = ConfigurationManager.ConnectionStrings["sqlcnn"].ConnectionString; SqlConnection con = new SqlConnection(str); SqlCommand cmd = con.CreateCommand(