- 博客(97)
- 资源 (8)
- 收藏
- 关注
转载 超级设为首页,加入收藏代码,自动识别域名,和收藏名称
设为首页URL就是你要设定的网址地址要设置当前网页的地址为首页,你可以这样:设为首页上述方法采用javascript的document.location对象的href属性来获得当前网页的全路径。同理,如果您只想将当前网页所在的域名地址设为首页,您只需将document.location.href改为document.location.host即可。示例如下:设为首页说明
2010-04-19 12:03:00 268
原创 在线客服JS
JS内容:var online= new Array();var urlroot = "/images/";var tOut = -1;var drag = false;var g_safeNode = null;lastScrollY = 0;var kfguin;var ws;var companyname;var welcomeword;var type;//function $(id)
2010-04-06 15:31:00 224
原创 网页载入中的代码和样式
现在的网页元素和图片比较多,经常遇到还没载入完全,浏览者就开始点击网站,造成某些需要载入完成才能执行的脚本不能执行,那我们怎么办呢?最简单的方法在body的onload事件加入处理,让没载入之前有个提示,或者在没载入之前屏蔽你的脚本,等载入完再开放。简单的代码如下,可放在网页任意位置:.dvloading{position:absolute;left:500px;top:500px;wid
2010-04-06 15:29:00 151
原创 实用,常用代码html js css
将彻底屏蔽鼠标右键IE地址栏前换成自己的图标状态栏动态显示现在时间 function see(){ window.setTimeout("see()",1000); today = new Date(); self.status = today.toString(); } 使弹出的DIV任何时候都居中的JS代码一直都在想怎么样使弹出的DIV能在任何时候都是居
2010-03-04 09:50:00 217
原创 26个Jquery使用小技巧
1. 禁止右键点击view plaincopy to clipboardprint?1. $(document).ready(function(){ 2. $(document).bind("contextmenu",function(e){ 3. return false; 4.
2010-03-04 08:58:00 108
转载 jquery实现打开窗口返回值
<div class="cnblogs_code" onclick="function onclick(){cnblogs_code_show(60779eed-66c9-4346-adb5-f97250ff8457)}">Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.C
2010-03-04 08:54:00 176
原创 删除图片时同时删除图片文件
1.Label lblurl = (Label)gridview1.Rows[i].Cells[0].FindControl("lblimaurl"); if (!string.IsNullOrEmpty(lblurl.Text.Trim().ToString())) { String path = Server.MapPath("~/UploadedImages/message/") +
2010-03-03 14:56:00 212
原创 ASP.NET按时间查询
select top 6 * FROM ViewHouseSale where 1=1 and (EstateType=0 or EstateType=1) and DateDiff(day,PubDate,getdate()) select top 6 * FROM ViewHouseSale where 1=1 and (EstateType=0 or
2010-03-03 10:50:00 226 1
原创 SQL触发器实例讲解
SQL触发器实例1定义: 何为触发器?在SQL Server里面也就是对某一个表的一定的操作,触发某种条件,从而执行的一段程序。触发器是一个特殊的存储过程。 常见的触发器有三种:分别应用于Insert , Update , Delete 事件。 我为什么要使用触发器?比如,这么两个表: Create Table Student(
2010-03-02 15:22:00 122
原创 字母查询汉字函数
CREATE function fun_getPY(@str varchar(60))returns varchar(1)asbegindeclare @word nchar(1),@PY varchar(60),@i int,@tmp varchar(60)set @word=substring(LTrim(@str),1,1)set @PY=if (@wordbegin--如果非汉字字符,
2010-03-02 14:39:00 142
转载 ASP.NET读取EXCEL文件的三种方法
1.方法一:采用OleDB读取EXCEL文件:把EXCEL文件当做一个数据源来进行数据的读取操作,实例如下:public DataSet ExcelToDS(string Path){string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +"Data Source="+ Path +";"+"Extended Properties=Excel
2010-03-02 11:28:00 119
原创 播放视频(c#)
using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using
2010-02-25 11:14:00 156
原创 在网页中插入视频[转]
在网页中插入FLV视频[转]方法一:使用DW中自带的播放器在页面中插入如下一段代码:http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="320" height="240" id="FLVPlayer">http://www.macromedia.com/go/ge
2010-02-25 09:48:00 359
转载 jQueryJSON 无刷新三级联动
asp:DropDownList ID="ddl1" runat="server" Width="100px" >asp:DropDownList> asp:DropDownList ID="ddl2" runat="server" Width="100px" >asp:DropDownList> asp:DropDownList ID="ddl3" run
2010-02-24 12:27:00 161
转载 比较实用的函数
/// /// 获取一个图片按等比例缩小后的大小。/// /// 需要缩小到的宽度/// 需要缩小到的高度/// 图片的原始宽度/// 图片的原始高度/// 返回图片按等比例缩小后的实际大小public static Size GetNewSize(int maxWidth, int maxHeight, int imageOriginalWidth, int imageOriginalHeigh
2010-02-21 10:09:00 108
原创 简单日常交流口语
1. I work for the government. 我在政府机关做事。2. Im an office worker. 我是上班族。 3. Im happy to meet you. 很高兴见到你。 4. Im glad to see you again. 很高兴再次见到你。 5. I like your sense of humor. 我喜欢你的幽默感。 6. Ill call y
2010-02-09 15:49:00 138
原创 脱口而出的习惯用语
1. 小事一桩Thats a piece of cake.Thats as easy as pie!I can do it with my eyes closed.2. 请你客气点Who do you think youre talking to?Dont get fresh with me (get fresh with 大多用于母亲对孩子的斥责之时)3. 等着瞧youll see.T
2010-02-09 15:48:00 133
原创 英语中的习惯用语
1、a bad apple 坏蛋A:Oh, my God! What happened? Why are you black and blue?B:I got beaten by Peter’s brotherA:That’s a bad apple! Let’s think up a way and teach him a lesson甲:噢,天哪!怎么啦?你身上怎么青一块紫一块的?乙:彼得的弟
2010-02-09 15:46:00 128
原创 生活中实用英语
1. After you.你先请。这是一句很常用的客套话,在进/出门,上车得场合你都可以表现一下。 2. I just couldnt help it.我就是忍不住。举一个例子: I was deeply moved by the film and I cried and cried. I just couldnt help it. 3. Dont take it to heart.别往心里
2010-02-09 15:45:00 149
原创 语面试对话
Q: Can you sell yourself in two minutes? Go for it. 你能在两分钟內自我推荐吗?大胆试试吧! A: With my qualifications and experience, I feel I am hardworking, responsible and diligent in any project I undertake. Your
2010-02-09 15:44:00 133
原创 JS+CSS漂亮相册效果
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml">JS+CSS相册展示*{ margin:0; padding:0; list-style:none}body{ font-family:Arial, Helvetica, sans-serif; font-size:12px;
2010-02-09 14:15:00 251
原创 左右可控的JS图片幻灯
左右可控的图片幻灯-www.codefans.net .Caption {font-family: Arial;font-weight: normal;font-size: 12pt;color: #FF3300; } A.Controls:link { color:#666666; text-decoration:none;
2010-02-09 14:14:00 254
原创 JavaScript 图片滚动(绝对酷)
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml">JS图片滚动TABLE { BORDER-TOP-WIDTH: 0px; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTT
2010-02-09 14:07:00 105
原创 JavaScript真正的鼠标放上动画加载大图的代码
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml">JavaScript真正的鼠标放上动画加载大图的代码*{ padding:0; margin:0;}html { overflow:-moz-scrollbars-vertical; }body{ word-break:bre
2010-02-09 14:04:00 144
转载 JS图片切换,带缩略图版
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml">五屏带缩略图幻灯片切换代码BODY { FONT-SIZE: 9pt; BACKGROUND: #d8d8d8; MARGIN: 0px auto; COLOR: #505050; FONT-FAMILY: 宋体,arial,
2010-02-09 14:01:00 96
转载 图片轮播
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml">JavaScript封装的平滑图片滚动body{ font-size:12px; color:#333;}#picBox{width:610px; height:205px; margin:50px auto; overflo
2010-02-09 14:00:00 82
原创 Jquery验证表单
$(document).ready(function(){$.formValidator.initConfig({formid:"aspnetForm",onerror:function(){alert("检验没有通过,具体错误请看提示")}}); $("#ctl00_contentHolder_txtLoginName").formValidator({onshow:"请输入用
2010-02-05 17:30:00 399 2
转载 jquery 复选框选
$( function() { //全选 $("#selectAll").click( function() { $("input[name=send-mail]").each( function() { $(this).attr("checked", true); })
2010-02-05 15:16:00 130
转载 jQuery的验证登陆
htmlhttp://www.w3.org/1999/xhtml" > 无标题页 $(function(){ $("#Button1").click(function(){ var username=$("#username").attr("value");
2010-02-04 11:17:00 139
原创 jquery验证插件的使用
插件地址:http://bassistance.de/jquery-plugins/jquery-plugin-validation/download:http://jquery.bassistance.de/validate/jquery.validate.zipdemo:http://jquery.bassistance.de/validate/demo/$(document).r
2010-02-03 11:58:00 146
原创 ASP.NET基于JQUERY的AJAX的验证登录(JSON)
Default.aspx http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> http://www.w3.org/1999/xhtml" > 主页 我要进行JQUERY登录验证 账号:admin 密码:admin l
2010-02-03 11:47:00 500 2
转载 web中可以用的滚动条
最简单的一种,通过一个隐藏的DIV,点击按钮时通过脚本往DIV中插入一个loading的gif和一些消息来让用户等待。等待的同时将除了自己的其他可以操作的html元素全部disable掉。先在页面中放置一个按钮一个隐藏的DIVasp:Button ID="btnLoad" runat="server" OnClick="btnLoad_Click" Text="Get
2010-02-03 09:15:00 121
原创 web中如何写log日志
cs代码:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->using System; using System.IO;
2010-02-03 09:13:00 155 1
原创 MSN即时交谈代码开始
function SendMSNMessage(name){//Send a message through MSN , only for IE//and you must have installed MSN or Window MessageMsgrObj.InstantMessage(name); }function AddMSNContact(name){//Add a people to
2010-02-03 09:11:00 103
原创 如何添加在线QQ咨询
如何添加在线QQ咨询?1、简单的说,如果想在页面里面直接添加在线qq咨询,只要把下面的代码加入到页面里面就可以了:Site=ShopEx.cn&Menu=yes" target="blank">362782611:12" border="0"/>其中:红色的部分,可以改成你的网站的名称,蓝色的部分,可以改成你的qq的号码绿色的部分,代表qq显示的样式,可以是1-17的不同数字,这样就会以不
2010-02-03 09:10:00 123
原创 js控制切换菜单背景变颜色
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">HTML>HEAD>TITLE> New Document TITLE>META NAME="Generator" CONTENT="EditPlus">META NAME="Author" CONTENT="">META NAME="Keywords" CONTENT="">M
2010-02-02 13:54:00 201
转载 ASP.NET中常用的三十三种代码
1. 打开新的窗口并传送参数 [返回目录]传送参数: response.write("<script>window.open(*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+")</script>") 接收参数: string a = Request.QueryString("id"); string b = Request.Que
2010-02-02 12:43:00 97
转载 JQuery常用方法一览
Attribute:$(”p”).addClass(css中定义的样式类型); 给某个元素添加样式$(”img”).attr({src:”test.jpg”,alt:”test Image”}); 给某个元素添加属性/值,参数是map$(”img”).attr(”src”,”test.jpg”); 给某个元素添加属性/值$(”img”).attr(”title”, function() { ret
2010-02-02 12:39:00 75
原创 禁止页面复制、保存等常用js命令
取消选取、防止复制 网页将不能被另存为 IE地址栏前换成自己的图标 可以在收藏夹中显示出你的图标 模仿IE //前进后退的按钮 onMouseOver="self.status=后退 ;return true;"> [back] onMouseOver="self.status=前进; return true;"
2010-02-02 10:47:00 133
原创 如何禁止复制页面内容
如何禁止复制页面内容1)在标签间加上如下代码当用IE保存网页时,会提示:无法保存网页2)把默认的标签改成:通常可以防止一部分的内容复制粘贴,当然有很多办法可以破解这个限制,所以,在下面还有一种方法不用屏蔽鼠标右键,而是对屏蔽掉鼠标选择要copy内容的功能。3)首先在页面的标签中加上如下代码:<script> function anticopy(n) { if(self.moveTo) {
2010-02-02 10:45:00 216
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人