带参数传递
IFRAME src="a.html?title = { dede:field . title/} "/iframe
然后在iframe中接收这个参数title,并把它赋给name表的值。
可以通过js获得
获取指定的URL参数值。
网址:
参数:paramName URL参数
方法:getParam("name ")
返回值:百年
//1.
函数getParam(paramName)
paramValue =
isFound = false
if(this . location . search . index of("?)= = 0 this . location . search . index of(" = ")1)
arr source = unescape(this . location . search)。substring(1,this.location.search.length)。拆分(" ");
I = 0;
while(我arrSource.length!isFound)
if (arrSource[i].indexOf("=") 0)
if (arrSource[i].split(" = "[0])。toLowerCase = = param name . toLowerCase)
paramValue = arrSource[i]。split(" = "[1];
isFound = true
i++;
返回paramValue