研究了下下 如果你有点Ajax基础应该有点帮助
我把个性定制导出了研究了下
var json_3721 =
{
"ver":"2006-11-01 13:18","title":
{"id":"title","t":"问候语","s":"titlewindowstyle","h":"0","u":"0","r":"0","e":"1","c":"0"
},
"clew":
{"id":"clew","t":"通知栏","s":"clewwindowstyle","h":"0","u":"0","r":"0","e":"0","c":"0"},
"columns":
[
{"cname":"col1","w":"30%","win":
[
{"id":"weather","t":"美丽今日","s":"blue","h":"0","u":"0","r":"0","e":"1","c":"0"},
{"id":"navigation_myweb","t":"我的网站","s":"blue","h":"0","u":"0","r":"0","e":"1","c":"0"},
{"id":"navigation_mail","t":"E-mail","s":"orange","h":"0","u":"0","r":"0","e":"1","c":"0"},
{"id":"navigation_native","t":"本地站点","s":"blue","h":"0","u":"0","r":"0","e":"1","c":"0"},
{"id":"navigation_download","t":"热门下载","s":"blue","h":"0","u":"0","r":"0","e":"1","c":"0"}
]},
{"cname":"col2","w":"40%","win":
[
{"id":"search","t":"搜索","s":"yellow","h":"0","u":"0","r":"0","e":"0","c":"0"},
{"id":"navigation_blog","t":"博客 Show","s":"blue","h":"0","u":"0","r":"0","e":"1","c":"0"},
{"id":"cnsminad","t":"广告","s":"blue","h":"0","u":"0","r":"0","e":"0","c":"0"},
{"id":"picture","t":"读图时代","s":"blue","h":"0","u":"0","r":"0","e":"1","c":"0"},
{"id":"navigation_tool","t":"实用工具","s":"blue","h":"0","u":"0","r":"0","e":"1","c":"0"},
{"id":"pad","t":"即时贴","s":"blue","h":"0","u":"0","r":"0","e":"1","c":"0"},
{"id":"countdown","t":"倒计时","s":"blue","h":"0","u":"0","r":"0","e":"1","c":"0"}
]},
{"cname":"col3","w":"30%","win":
[
{"id":"navigation_class","t":"分类站点","s":"yellow","h":"0","u":"0","r":"0","e":"0","c":"0"}
]}
]
};
JS里面对应的 json_3721 只取了一点点
var tmp_obj=null;
for(var i=0;i<json_3721.columns[oldColNum].win.length;i++)
{
if(json_3721.columns[oldColNum].win[i].id==curwinId)
{
tmp_obj=json_3721.columns[oldColNum].win[i];
json_3721.columns[oldColNum].win.splice(i,1);
break;
}
}
if(curNextWinId=="NULL")
{
json_3721.columns[curColNum].win[json_3721.columns[curColNum].win.length]=tmp_obj;
}
else
{
for(var j=0;j<json_3721.columns[curColNum].win.length;j++)
{
if(json_3721.columns[curColNum].win[j].id==curNextWinId)
{
var last=json_3721.columns[curColNum].win.length-1;
while(j<=last)
{
json_3721.columns[curColNum].win[last+1]=json_3721.columns[curColNum].win[last];last--;
}
json_3721.columns[curColNum].win[j]=tmp_obj;break;
}
}
}
var postdata="f=3721&v="+ExpJSON("json_3721");
startRequest('POST','http://www.',postdata);Drag.obj=null
;}
调用了 ExpJSON
function ExpJSON(objname)
{
var jsonstr="";
var arrflag=0;
var arrcount=0;
var tmpobj=eval(objname);
if(isString(tmpobj))
{
jsonstr+=tmpobj;
}
else
{
if(isArray(tmpobj))
{
jsonstr+=getArrObjstr(tmpobj);
}
else
{
jsonstr+=getObjstr(tmpobj);
jsonstr=jsonstr.substr(0,jsonstr.length-1);
}
}
return jsonstr;
}
眼睛有点花了 剩下的你自己去查查看吧 原理在第一段代码有关有点眉目了
需要注意点的是 他是用 php做的.!