本博客记录傻猫的生活、工作和学习,并与大家一起分享快乐.
该日志由 samool 发表于 2008-06-28 9:29 AM
function GetCgiName()
{
var sDomin = g_CSelfUrl.GetPara("u1").replace(/#$/g, "").split("?")[0];
var arrPath = sDomin.split("/");
return arrPath[arrPath.length-1];
}
function ParseSubPage(){
var obj=document.getElementById("main");
if(obj){
var sUrl=g_mapPage[GetCgiName()];
if(!sUrl || sUrl=="")
sUrl=g_mapPage["def"];
obj.src=sUrl;
}
该日志标签: javascript
该日志由 samool 发表于 2008-06-26 8:04 PM
//获得当前的脚本网址
function GetCurUrl(){
if(!empty($_SERVER["REQUEST_URI"])){
$scriptName = $_SERVER["REQUEST_URI"];
$nowurl = $scriptName;
}else{
$scriptName = $_SERVER["PHP_SELF"];
if(empty($_SERVER["QUERY_STRING"])) $nowurl = $scriptName;
else $nowurl = $scriptName."?".$_SERVER["QUERY_STRING"];
}
return $nowurl;
}
该日志由 samool 发表于 2008-06-02 11:14 AM
This is a point of confusion, for some: How can you use CSS and XPath together, they're so different! jQuery makes some allowances to make this happen, but we think that developers will really appreciate the advantages of each language. Here are some examples: