有如下实现方法:在Firefox,GoogleChrome,Safari,Opera中:可以用window.getSelection()(参考MDC)在IE下,可以用document.selection.createRange().text(参考MSDN)注:将两者放在一起的代码:[code]functiongetSelectionText(){if(window.getSelection){returnwindow.getSelection().toString();}elseif(document.selection&&document.selection.createRa...
http://www.jb51.net//article/16690.htm
[html]<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/><title>JS获得鼠标位置(兼容多浏览器ie,firefox)脚本之...
http://www.jb51.net//article/16645.htm
register.aspx页面代码:<script type="text/javascript">function checkuser(){var option={ parameters:"userid="+$("userid").value, method:"post", onSuccess:function(transport){ var rp=transport.responseText; if(rp=="true") { alert("该用户昵称存在!!"); } else { alert("该用户昵称不存在,请重新输入!!"); }},on...
http://www.jb51.net//article/16597.htm
[code]varisie=(document.all)?true:false;varkey;varev;if(isie){key=window.event.keyCode;ev=window.event;}else{key=e.which;ev=e;}[/code]这个时候可以alert(key)看看,但是要是想用到ev.returnValue=true;//IEev.preventDefault();//MozillaFirefox...
http://www.jb51.net//article/16454.htm
需要引入命名空间:[code]usingSystem.Net;usingSystem.IO;[/code]函数内容:[code]///<summary>///根据Url获得源文件内容///</summary>///<paramname="url">合法的Url地址</param>///<returns></returns>publicstaticstringGetSourceTextByUrl(stringurl){WebRequestrequest=WebRequest.Create(url);request.Timeo...
http://www.jb51.net//article/15786.htm
获得SQL数据/日志空间使用,已使用的和未使用的空间的脚本getSQLinfo.vbs'script to get SQL DATA/LOG Space Used, Space unused, and Space Free 'Author: Felipe Ferreira, Daniel Magrini'Date: 05/07/07'Version 2,0'@@TO CHANGE::...
http://www.jb51.net//article/15162.htm
[code]Set objHTML=CreateObject("htmlfile") 'xmlfile、mhtmlfile都可以ClipboardText=objHTML.ParentWindow.ClipboardData.GetData("text")MsgBox ClipboardText[/code]...
http://www.jb51.net//article/14909.htm
[code]Function getLastWord(str)Set regEx = New RegExpregEx.Pattern = "(.*)([a-zA-Z])[^a-zA-Z]*"regEx.IgnoreCase = falseregEx.Global = Truestr = regEx.Replace(str,"$2")getLastWord = strSet reg=nothingEnd Functi...
http://www.jb51.net//article/14888.htm
以前讲过一篇文章叫外链的多少决定搜索的更新速度,还有就是外链对PR也是非常的关键,今天我们要讲的就是,我们新的网站出来没有PR怎么办,如何排到别人的前面,如何跟别人PR高的做链接的问题。 一、人品+口碑 你的人品好,在业内的口碑好,人缘就好。如果你有了这一切,很多业内的人士都很乐意跟你做个链接,甚至是单向链接。如果图王找我做链接,我二话不说,我可以在我所有的站点首页给他做链接!为什么,人品和人员问题。这个需要大家好好的,认真的经营自己的个人品牌...
http://www.jb51.net//article/14246.htm
下面的例子可以监听内核的hotplug事件,源代码如下: [code]#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <sys/un.h> #include <sys/ioctl.h> #include <sys/socket.h>&nb...
http://www.jb51.net//article/14028.htm
找到include/inc_functions.php(此函数为公共函数,当程序运行时自动加载)在尾部添加新的函数如下:[code]//通过栏目ID获取栏目的名称 function GetTypeName($typeid){ $dsql = new DedeSql(false); $row = $dsql->GetOne("select typename From #@__arctype ...
http://www.jb51.net//article/13915.htm
