2010年4月21日
摘要: <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 阅读(301) 评论(0) 推荐(0) 编辑
摘要: <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 阅读(248) 评论(0) 推荐(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 阅读(233) 评论(0) 推荐(0) 编辑
摘要: Server对象:定义与服务器相关的类,提供对服务器上的方法和属性的访问。主要两个方法:Execute和transfer重定向页面Execute方法在本浏览器窗口实现,保留控制权Transfer方法完全转移到指定的页面。在页面上放置两个按钮控件,后台代码如题:protectedvoidButton2_Click(objectsender,EventArgse){Server.Execute("De... 阅读全文
posted @ 2010-04-21 13:02 wtq 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 获取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 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 步骤一:设置绑定数据属性。publicstringgoodname{get{return"我是超级无敌手";}}publicstringgoodking{get{return"我是王者";}}步骤二:在aspx页中显示数据这里是数据绑定<br/>商品名称:<%#goodname%>商品型号:<%#goodking%>步骤三:在page-load中添加如下代码进行... 阅读全文
posted @ 2010-04-21 12:44 wtq 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 如何实现一个自定义的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 阅读(471) 评论(2) 推荐(0) 编辑
  2010年4月20日
摘要: 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 阅读(2180) 评论(0) 推荐(0) 编辑
  2010年4月19日
摘要: 1,关键技巧,通过showModelessDialog(url,argument,features);中的argument来传递参数,通过window.dialogArguments获取传递进来的参数 2.应用领域:需要通过单击,来显示一个对话框,也可以是小小的展示效果如音乐播放器 ,时钟,等等。 具体代码如下: 在showDialog页面中 代码 Code highlighting produc... 阅读全文
posted @ 2010-04-19 22:45 wtq 阅读(432) 评论(1) 推荐(1) 编辑
摘要: 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 阅读(5389) 评论(0) 推荐(0) 编辑