网站开发与移动开发

博客园 首页 新随笔 管理

2008年10月30日 #

摘要: 建一个文件list.htm <html> <head> <title>新闻列表简化型</title> <scriptlanguage="javascript"> <!-- //ajax控件也可以做成单独文件方便到其它地方调用 functionAjax() { varxhrObj=null; if(window.XMLHttpRequest) { xhrObj=newXMLHttpRequest(); } elseif(window.ActiveXObject) { try{ xhrObj=newActiveX 阅读全文
posted @ 2008-10-30 18:01 txf2004 阅读(162) 评论(0) 推荐(0) 编辑

摘要: list.asp <%@LANGUAGE="VBSCRIPT"CODEPAGE="936"%> <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>default</title> <metahttp-equiv="Content-Type" 阅读全文
posted @ 2008-10-30 18:01 txf2004 阅读(165) 评论(0) 推荐(0) 编辑

摘要: 一个页面加载一个FLASH。点击页面中的按钮。加载让FLASH加载按钮对应的FLASH: AC_RunActiveContent.js //v1.7 //FlashPlayerVersionDetection //DetectClientBrowsertype //Copyright2005-2007AdobeSystemsIncorporated.Allrightsreserved. varisIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false; varisWin=(navigator.appVersion.t 阅读全文
posted @ 2008-10-30 18:00 txf2004 阅读(161) 评论(0) 推荐(0) 编辑

摘要: 实现内容:截断一段含有HTML代码的文本,但是不会出现围堵标记没有封闭的问题。 核心部分如下: functionGenerate_Brief(text,length){ if(text.length<length)returntext; varForemost=text.substr(0,length); varre=/<(//?)(BODY|SCRIPT|P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|TABLE|TR|TD|TH|INPUT|SELECT|TEXTAREA|OBJECT|A|UL|OL|LI|BASE|META|LINK|HR|BR|PA 阅读全文
posted @ 2008-10-30 18:00 txf2004 阅读(389) 评论(0) 推荐(0) 编辑

摘要: 在IE中关闭当前页(会弹出关闭提示) getURL("JavaScript:window.close()"); 在IE中关闭当前页(跳过关闭提示) getURL("javascript:window.opener=null;window.close()"); 在IE中添加到收藏夹 getURL("javascript:voidwindow.external.AddFavorite('http://www.webjx.com&#39;,&#39;网页教学网&#39;)"); 在浏览器中刷新页面 getUR 阅读全文
posted @ 2008-10-30 17:59 txf2004 阅读(196) 评论(0) 推荐(0) 编辑

摘要: <!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <htmlxmlns="http://www.w3.org/1999/xhtml"> <HEAD> <TITLE>NewDocument</TITLE> <styletype="text/css"> #fours_m{ 阅读全文
posted @ 2008-10-30 17:58 txf2004 阅读(117) 评论(0) 推荐(0) 编辑

摘要: <styletype="text/css"> .woon{border:1pxsolid#fff;} .wooff{border:1pxsolid#ffffff;filter:progid:DXImagetransform.Microsoft.Alpha(style=1,opacity=1500,finishOpacity=1);} </style> <scriptlanguage="JavaScript"type="text/JavaScript"> <!-- window.onerror= 阅读全文
posted @ 2008-10-30 17:57 txf2004 阅读(141) 评论(0) 推荐(0) 编辑

摘要: 腾讯宽频的图片新闻效果 <scriptlanguage=javascript> //-------定义图片路径等参数-------------// //定义大图的路径, varbigPic3="http://img1.qq.com/bb/pics/4700/4700089.jpg"; varbigPic2="http://img1.qq.com/bb/pics/4641/4641683.jpg"; varbigPic0="http://img1.qq.com/bb/pics/4682/4682794.jpg"; varbi 阅读全文
posted @ 2008-10-30 17:57 txf2004 阅读(118) 评论(0) 推荐(0) 编辑

摘要: 显示位置的定义和是否自动消失或多长时间渐隐消失。 代码如下: /* message:要显示的消息 x,y:显示消息框的坐标,默认为左上角 delay:延迟多长时间消失,-1为永不消失,单位为毫秒 */ functionfeedBackMessage(message,x,y,delay){ if(!message)return; //只允许百分数或数值参数 x=//d{1,2}%|100%|left|right/.test(x)?x:(parseInt(x)||0)+"px"; y=//d{1,2}%|100%|top|bottom/.test(y)?y:(parseInt( 阅读全文
posted @ 2008-10-30 17:55 txf2004 阅读(242) 评论(0) 推荐(0) 编辑