1.<a href=# onclick="window.open('123.htm','','width=120,height=200')">aa</a>
2.<a href="javascript:void(null);" onclick="window.open('123.htm','','width=100,height=100');">Click</a>
3.<a href=#none onclick="window.open('弹出窗口地址','','width=200,height=200')">open win</a>
4.弹出按扭代码
<script language=vbscript>
msgbox "弹出1"
msgbox "弹出2"
msgbox "弹出3"
</script>
5.文字链接,可改变窗口大小
<SCRIPT LANGUAGE="javascript">
<!--- Hide
var new_window = null;
function password() {
new_window = window.open('弹出窗口的地址', 'pass', 'width=350,height=150,resizable=1');//你可以改变链接和窗口大小resizable=1/0是否固定窗口大小
}
//--->
</SCRIPT>
<A HREF="javascript:password()">网站调查</A>
6.下面是点击按扭弹出播放视频小窗口的代码
<input type="button" value="窗外" onclick="goplay('D:\\My Documents\\My music\\流行歌曲\\窗外.mp3')">
<input type="button" value="简单爱" onclick="goplay('D:\\My Documents\\My music\\流行歌曲\\周杰伦—简单爱.wma')">
<input type="button" value="那些花儿" onclick="goplay('D:\\My Documents\\My music\\流行歌曲\\那些花儿.mp3')">
<input type="button" value="勇敢" onclick="goplay('D:\\My Documents\\My music\\流行歌曲\\张惠妹 - 勇敢.wma')">
<input type="button" value="勇气" onclick="goplay('D:\\My Documents\\My music\\流行歌曲\\梁静茹-勇气.wma')">
<input type="button" value="流星雨" onclick="goplay('D:\\My Documents\\My music\\流行歌曲\\F4-流星雨.wma')">
<script language="JavaScript">
<!--
function goplay(url)
{
var n="\n";
var ss='<html><head><title>播放窗口</title></head><body topmargin="0" leftmargin="0">'+n
+'<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="WindowsMediaPlayer1" width="100%"height="100%">'+n
+' <param name="URL" value="'+url+'">'+n
+' <param name="rate" value="1">'+n
+' <param name="balance" value="0">'+n
+' <param name="currentPosition" value="0">'+n
+' <param name="defaultFrame" value>'+n
+' <param name="playCount" value="1">'+n
+' <param name="autoStart" value="-1">'+n
+' <param name="currentMarker" value="0">'+n
+' <param name="invokeURLs" value="-1">'+n
+' <param name="baseURL" value>'+n
+' <param name="volume" value="50">'+n
+' <param name="mute" value="0">'+n
+' <param name="uiMode" value="full">'+n
+' <param name="stretchToFit" value="0">'+n
+' <param name="windowlessVideo" value="0">'+n
+' <param name="enabled" value="-1">'+n
+' <param name="enableContextMenu" value="-1">'+n
+' <param name="fullScreen" value="0">'+n
+' <param name="SAMIStyle" value>'+n
+' <param name="SAMILang" value>'+n
+' <param name="SAMIFilename" value>'+n
+' <param name="captioningID" value>'+n
+' <param name="enableErrorDialogs" value="0">'+n
+' <param name="_cx" value="6350">'+n
+' <param name="_cy" value="6482">'+n
+'</object></body></html>';
var wop = window.open("","iecn","width=320,height=320,resizable=yes");
wop.document.write(ss);
wop.document.close();
wop.focus();
}
//-->
</script>
更多的点击后弹出小窗口请到论坛查看: http://BBS.TC711.COM
【 双击滚屏 】 【 评论 】 【 收藏 】 【 打印 】 【 关闭 】
来源:
互联网
日期:2008-7-21