鼠标事件的抓取
摘要:1.通过ele.setCapture();设置鼠标事件的抓取。2,应用可以通过单、双击文字来获取时间。代码如下:<html> <head><title>鼠标事件的抓取</title><script language="JavaScript">// 鼠标事件的抓取function mouseCapture(){ ele.setCapture...
阅读全文
posted @
2010-04-21 16:41
wtq
阅读(385)
推荐(0) 编辑
气泡事件系统
摘要:气泡事件系统属于一种阶层架构的事件处理系统,即触发子标签也会触发父标签。<html><head> <title>气泡事件系统</title></head><body onclick="alert('<body>');"><h2>气泡事件系统</h2><hr><form na...
阅读全文
posted @
2010-04-21 16:31
wtq
阅读(251)
推荐(0) 编辑
取消事件的处理
摘要:1,应用,动态设置事件是否激发代码:<html> <head><title>取消事件处理</title><script language="JavaScript">// 事件处理程序function showAlert(){ alert("测试取消事件处理!");}// 取消事件function cancelEvent(){ docume...
阅读全文
posted @
2010-04-21 16:24
wtq
阅读(266)
推荐(0) 编辑
Window和Document对象的事件
摘要:1,新特点,单击文档,自动弹出一个对话框,代码如下:<html><head> <title>Window和Document对象的事件</title><script language="JavaScript">// 事件处理程序function showAlert(){ alert("测试Window和Document对象的事件!");}/...
阅读全文
posted @
2010-04-21 16:20
wtq
阅读(394)
推荐(0) 编辑
动态样式CSS-动态样式的字型与色彩。
摘要:1,要点:先获得标签对象,再通过sytle对其属性进行设置2,主要创新:改变页面的背景颜色:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www....
阅读全文
posted @
2010-04-21 16:03
wtq
阅读(468)
推荐(0) 编辑
HTML标签的尺寸与位置
摘要:<html><head> <title>访问HTML元素的位置和尺寸</title><script language="JavaScript">function showPosition(){ alert("left:" + myP.offsetLeft + " top:" +myP.offsetTop);}function showSi...
阅读全文
posted @
2010-04-21 15:15
wtq
阅读(4415)
推荐(0) 编辑
访问HTML标签的属性1
摘要:<html> <head><title>访问HTML标签的属性</title><script language="JavaScript">function setAlign(strAlign){ myP.align = strAlign;}function getAlign(){ alert(document.all.tags("P")....
阅读全文
posted @
2010-04-21 15:10
wtq
阅读(257)
推荐(0) 编辑
访问HTML标签的内容
摘要:<html> <head><title>访问HTML元素的内容</title><script language="JavaScript">function changeText(){ myH2.innerText = "更改文字内容";}function changeHTML(){ myH2.innerHTML = "<marque...
阅读全文
posted @
2010-04-21 15:06
wtq
阅读(312)
推荐(0) 编辑
HTMl文件的阶层架构 访问父元素和子元素
摘要:<html> <head><title>访问父元素和子元素</title><script language="JavaScript">function showParentTag(){ alert(myP.parentElement.tagName); }function showChildsTag(){ var strTags = ""...
阅读全文
posted @
2010-04-21 14:58
wtq
阅读(2394)
推荐(0) 编辑
获取HTMl文件制定的元素
摘要:<html> <head><title>获取HTML文件的指定元素</title><script language="JavaScript">function getElement1(){ alert(document.all("myH2").tagName);}function getElement2(){ alert(myH2.tag...
阅读全文
posted @
2010-04-21 14:56
wtq
阅读(312)
推荐(0) 编辑
显示HTML文件的所有元素
摘要:<html> <head><title>获取HTML文件的元素</title><script language="JavaScript">function showElements(){ var strTags = ""; for(var i=0; i<document.all.length; i++){ objEle = docu...
阅读全文
posted @
2010-04-21 14:51
wtq
阅读(249)
推荐(0) 编辑
动态改变绝对位置
摘要:前台代码:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xh...
阅读全文
posted @
2010-04-21 13:11
wtq
阅读(238)
推荐(0) 编辑
Server对象:定义与服务器相关的类,提供对服务器上的方法和属性的访问。
摘要:Server对象:定义与服务器相关的类,提供对服务器上的方法和属性的访问。主要两个方法:Execute和transfer重定向页面Execute方法在本浏览器窗口实现,保留控制权Transfer方法完全转移到指定的页面。在页面上放置两个按钮控件,后台代码如题:protectedvoidButton2_Click(objectsender,EventArgse){Server.Execute("De...
阅读全文
posted @
2010-04-21 13:02
wtq
阅读(275)
推荐(0) 编辑
利用Cookie变量来存储信息和服务器页面
摘要:获取IP地址:代码如下:protectedvoidButton3_Click(objectsender,EventArgse){stringuserIP=Request.UserHostAddress.ToString();Response.Cookies["IP"].Value=userIP;//给cookies赋值}protectedvoidButton1_Click(objectsender...
阅读全文
posted @
2010-04-21 13:01
wtq
阅读(210)
推荐(0) 编辑
属性数据绑定
摘要:步骤一:设置绑定数据属性。publicstringgoodname{get{return"我是超级无敌手";}}publicstringgoodking{get{return"我是王者";}}步骤二:在aspx页中显示数据这里是数据绑定<br/>商品名称:<%#goodname%>商品型号:<%#goodking%>步骤三:在page-load中添加如下代码进行...
阅读全文
posted @
2010-04-21 12:44
wtq
阅读(194)
推荐(0) 编辑
自制confirm对话框
摘要:如何实现一个自定义的confirm的对话框。1,添加类文件:在.cs文件中添加头文件usingSystem.Text.RegularExpressions;后续代码如下:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1usingSystem;2u...
阅读全文
posted @
2010-04-21 12:43
wtq
阅读(475)
推荐(0) 编辑
xml 通讯录
摘要:1,xml通讯录代码:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1<?xmlversion="1.0"encoding="UTF-8"?>2<!DOCTYPE通讯录SYSTEM"C:\xml\test2\classmate1...
阅读全文
posted @
2010-04-20 11:35
wtq
阅读(2186)
推荐(0) 编辑
window内置对像showModelessDialog()
摘要:1,关键技巧,通过showModelessDialog(url,argument,features);中的argument来传递参数,通过window.dialogArguments获取传递进来的参数 2.应用领域:需要通过单击,来显示一个对话框,也可以是小小的展示效果如音乐播放器 ,时钟,等等。 具体代码如下: 在showDialog页面中 代码 Code highlighting produc...
阅读全文
posted @
2010-04-19 22:45
wtq
阅读(437)
推荐(1) 编辑
window.open 打开全屏窗口
摘要:1,利用winID = window.open(url,name,features,replace); 中的features中的属性来使新窗口全屏化2,应用领域,需要全屏显示网页的页面。代码如下:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1...
阅读全文
posted @
2010-04-19 17:45
wtq
阅读(5468)
推荐(0) 编辑
父窗口控制子窗口的行为-打开,关闭,重定位,回复
摘要:1,技术要点可以利用windows的open和closed来对子窗口的控制应用领域:需要父窗口和子窗口之间进行互动。代码如下:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXH...
阅读全文
posted @
2010-04-19 17:01
wtq
阅读(523)
推荐(0) 编辑
JS 横幅广告
摘要:,使用横幅广告来实现页面的不同显示方式。即每一次登入时,将显示不同的页面效果:如图:后台代码如下:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transit...
阅读全文
posted @
2010-04-15 10:48
wtq
阅读(2581)
推荐(2) 编辑
JS 显示时钟
摘要:1,只用JavaScript显示时钟图:如下:后台代码如下:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1设置显示一个时间2;3代码如下:456<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transiti...
阅读全文
posted @
2010-04-15 10:43
wtq
阅读(644)
推荐(0) 编辑
投票系统-管理
摘要:投票系统管理界面:其源代码:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1<%@ControlLanguage="C#"AutoEventWireup="true"CodeFile="ManageVote.ascx.cs"Inherits...
阅读全文
posted @
2010-04-11 22:48
wtq
阅读(480)
推荐(0) 编辑
投票系统-显示所有的投票主题(进行投票)
摘要:1,本投票系统通过博客Id获取用户Id,再通过用户ID获取投票主题界面如下:后台代码如下:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1<%@ControlLanguage="C#"AutoEventWireup="true"CodeF...
阅读全文
posted @
2010-04-11 22:42
wtq
阅读(1242)
推荐(0) 编辑
html中使用css的方法
摘要:1,行列样式:[代码]2,内嵌式:(包含三种标记选择器)代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1<styletype="text/css">23456.red7{8color:#C00;9font-size:18px;1011...
阅读全文
posted @
2010-04-09 11:09
wtq
阅读(4211)
推荐(0) 编辑
css ID选择器
摘要:1,在使用ID选择器时,一定要注意在一个html页面中,一次只能使用,因为此id可能被css调用,也可能被javascript调用,例如函数getElementById(),确保ID唯一,才不会在被调用时,产生冲突。因为同时又两个相同的id,不知道要调用哪一个。[代码]8{9color:yellow;10}示例,[代码][代码]
阅读全文
posted @
2010-04-09 10:08
wtq
阅读(264)
推荐(0) 编辑
css随时录
摘要:1.很多时候页面中几乎所有的<p>标记都使用相同的样式风格,只有1`2个特殊的<p>的标记需要使用不同的风格来突出,这时可以通过class选择器与标记选择器配合使用,具体代码如下:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/...
阅读全文
posted @
2010-04-09 09:37
wtq
阅读(216)
推荐(0) 编辑
博客投票系统
摘要:投票系统数据库设计1,数据库设计:投票管理界面:后台代码如图:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AddVot...
阅读全文
posted @
2010-04-08 17:32
wtq
阅读(1384)
推荐(2) 编辑