function getParam()
{
urlInfo=window.location.href; //获取当前页面的url
intLen=urlInfo.length; //获取url的长度
offset=urlInfo.indexOf("?"); //设置参数字符串开始的位置
strKeyValue=urlinfo.substr(offset,len); //取出参数字符串 这里会获得类似“id=1”这样的字符串
arrParam=strKeyValue.split("="); //对获得的参数字符串按照“=”进行分割
strParamValue=arrParam[1]; //得到参数值
alert("您要传递的参数值是"+strParamValue);
}
javascript removeChild 使用注意事项
假如:一段普通的代码:其中gift_list为一个table的idvargiftBody=document.getElementById("gift_list").getElementsByTagName("tbody")[0];vargiftTrs=giftBody.getElementsByTagName("tr");for(
由document.body和document.documentElement想到的
对于document.compatMode,很多朋友可能都根我一样很少接触,知道他的存在却不清楚他的用途。其实这个对于我们开发兼容性的web页面还是很有帮助,我们
iframe 自适应高度[在IE6 IE7 FF下测试通过]
第一种方法:scripttype="text/javascript"language="javascript"!--//调整PageContent的高度functionTuneHeight(){varfrm=document.getElementById("content01");varsubWeb=document.frames?document.fram