Sep
17
zz from http://www.360happy.cn/2008/07/21/632810/
Javascript解析URL的方法
URL: 统一资源定位符 (Uniform Resource Locator, URL)
完整的URL由这几个部分构成:
scheme://host:port/path?query#fragment
scheme = 通信协议 (常用的http,ftp,maito等)
host = 主机 (域名或IP)
port = 端口号
path = 路径
query = 查询
Javascript解析URL的方法
URL: 统一资源定位符 (Uniform Resource Locator, URL)
完整的URL由这几个部分构成:
scheme://host:port/path?query#fragment
scheme = 通信协议 (常用的http,ftp,maito等)
host = 主机 (域名或IP)
port = 端口号
path = 路径
query = 查询
Jun
23
比如打开的文件是http://19880711.com/blog/read.php?987,那么返回一个字符串为"?987"
代码如下:
代码如下:
<script language="javascript">
function getRequestString(){
var url=window.location+"";
url=url.substr(url.indexOf("?"));
if(url==window.location)url="";
return url;
}
</script>
function getRequestString(){
var url=window.location+"";
url=url.substr(url.indexOf("?"));
if(url==window.location)url="";
return url;
}
</script>
May
20
在没有ssl的主机上如何最大限度保证传输密码安全? 一个很简单的想法是,利用Javascript在客户端进行md5码加密后再传输至服务端,这样不仅可以降低服务器的压力,而且更重要的是传输的是密文,更加安全。
(本文参考 http://hi.baidu.com/qk31/blog/item/b50b78f4db7dc1d9f2d385d5.html)
实现方法:
1. 先下载这个javascript文件:
(本文参考 http://hi.baidu.com/qk31/blog/item/b50b78f4db7dc1d9f2d385d5.html)
实现方法:
1. 先下载这个javascript文件:
Apr
8
from http://topic.csdn.net/t/20060905/14/4999773.html
function ttt() {alert(1);}
if (typeof(ttt) == "function")
alert("yes");
else
alert("no");
if (typeof(ttt) == "function")
alert("yes");
else
alert("no");