function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
document.all['server'].style.height=server.document.body.scrollHeight
}
这个是javascipteval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
document.all['server'].style.height=server.document.body.scrollHeight
}
在body处
<body onload="document.all['server'].style.height=server.document.body.scrollHeight">
<iframe frameborde="false" name="server" src="../listserver.asp?id=$sid" width="452" SCROLLING="NO" ></iframe>
加一个跳出的想当于target<script>top.location.href='login.asp';</script>
就是上面的一个问题,弄了一个下午,如果把onload放到iframe里面,则不能实现上面的较果!最近写代码,javascript多了起来了!
————————————————————————————————————
要把网站的流量弄上去!
<script language="JavaScript"><!--
function WindowClose()
{
if(document.all)
{
if(parseFloat(window.navigator.appVersion.substr(window.navigator.appVersion.indexOf("MSIE")+5, 3)) < 5.5)
{
var str = '<object id=meizzMax classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">'
str += '<param name="Command" value="Close"></object>';
document.body.insertAdjacentHTML("beforeEnd", str);
document.all.meizzClose.Click();
}
else
{
window.opener = "meizz";
window.close();
}
}
else window.close();
}
//--></script>
<!--<input type=button value=关闭 onclick="WindowClose()">-->
function WindowClose()
{
if(document.all)
{
if(parseFloat(window.navigator.appVersion.substr(window.navigator.appVersion.indexOf("MSIE")+5, 3)) < 5.5)
{
var str = '<object id=meizzMax classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">'
str += '<param name="Command" value="Close"></object>';
document.body.insertAdjacentHTML("beforeEnd", str);
document.all.meizzClose.Click();
}
else
{
window.opener = "meizz";
window.close();
}
}
else window.close();
}
//--></script>
<!--<input type=button value=关闭 onclick="WindowClose()">-->
<script language='javascript'>
function copyToClipBoard(){
var clipBoardContent='';
clipBoardContent+="以总理称黎武装分子袭击以第三大城市后果严重";
clipBoardContent+='\r\nhttp://news.163.com/06/0716/16/2M5R7T1B0001121M.html';
window.clipboardData.setData("Text",clipBoardContent);
alert("你已复制链接及标题,请粘贴到POPO/MSN等发给好友!");
}
</script>
<input title="点击复制标题和地址到剪贴版,直接在POPO/MSN上粘贴即可." type=button value="点击复制本网址,发给POPO/QQ/MSN好友共享" name="B3" onclick="copyToClipBoard()">
function copyToClipBoard(){
var clipBoardContent='';
clipBoardContent+="以总理称黎武装分子袭击以第三大城市后果严重";
clipBoardContent+='\r\nhttp://news.163.com/06/0716/16/2M5R7T1B0001121M.html';
window.clipboardData.setData("Text",clipBoardContent);
alert("你已复制链接及标题,请粘贴到POPO/MSN等发给好友!");
}
</script>
<input title="点击复制标题和地址到剪贴版,直接在POPO/MSN上粘贴即可." type=button value="点击复制本网址,发给POPO/QQ/MSN好友共享" name="B3" onclick="copyToClipBoard()">
转载请注明出处
及其作者feng_sundy
我的Javascript(二)
function String.prototype.trim(){return this.replace(/(^\s*)|(\s*$)/g,"");}
function gf_AppendZero(n){return(("00"+ n).substr(("00"+ n).length-2));}//日期自动补零程序//
//取得当前系统日期时间
function gf_now()
{
var fs_now = new Date();
var fs_return="";
fs_return = fs_now.getFullYear() + "-" + gf_AppendZero(fs_now.getMonth() + 1) + "-" + gf_AppendZero(fs_now.getDate());
fs_return +=" " + gf_AppendZero(fs_now.getHours()) + ":" + gf_AppendZero(fs_now.getMinutes()) + ":" + gf_AppendZero(fs_now.getSeconds());
return fs_return;
}
//取得当前系统日期
function gf_today()
{
var fs_now = new Date();
var fs_return="";
fs_return = fs_now.getFullYear() + "-" + gf_AppendZero(fs_now.getMonth() + 1) + "-" + gf_AppendZero(fs_now.getDate());
return fs_return;
}
//验证日期是否合法(true/false)
及其作者feng_sundy
我的Javascript(二)
function String.prototype.trim(){return this.replace(/(^\s*)|(\s*$)/g,"");}
function gf_AppendZero(n){return(("00"+ n).substr(("00"+ n).length-2));}//日期自动补零程序//
//取得当前系统日期时间
function gf_now()
{
var fs_now = new Date();
var fs_return="";
fs_return = fs_now.getFullYear() + "-" + gf_AppendZero(fs_now.getMonth() + 1) + "-" + gf_AppendZero(fs_now.getDate());
fs_return +=" " + gf_AppendZero(fs_now.getHours()) + ":" + gf_AppendZero(fs_now.getMinutes()) + ":" + gf_AppendZero(fs_now.getSeconds());
return fs_return;
}
//取得当前系统日期
function gf_today()
{
var fs_now = new Date();
var fs_return="";
fs_return = fs_now.getFullYear() + "-" + gf_AppendZero(fs_now.getMonth() + 1) + "-" + gf_AppendZero(fs_now.getDate());
return fs_return;
}
//验证日期是否合法(true/false)





