如何在文章中添加MID格式的背景音樂 | |
<BGSOUND balance=0 src="" volume=-240 loop=infinite> <BGSOUND balance=0 loop=infinite src="" volume=-240> 輕音樂網址: http://mp3.baidu.com/m?f=ms&tn=baidump3&ct=134217728&lf=&rn=&word=%C7%E1%D2%F4%C0%D6&lm=-1#1 <iframe marginwidth=0 marginheight=0 frameborder=0 scrolling=no src='''' width=410 height=90></iframe> <BGSOUND balance=0 src="" volume=-240 loop=infinite> function click() {if (event.button==2) {alert(''西域風謝謝光臨!'');}}document.onmousedown=click | |
|
把下列代碼放到<body></body>或者<head></head>之間
<script LANGUAGE="JavaScript">
function click() { if (event.button==2)
{alert(''你好,右鍵已被禁止使用''); } } document.onmousedown=click
</script>
alert(''……'')是右鍵單擊引發的事件,你也可以改成其它事件,如打開收藏夾,只要把alert那一句代碼改成window.external.addFavorite(''http://luguozhi.myetang.com'',''毓秀學院'')即可
這種禁止右鍵是不可靠的:依次按下左鍵,右鍵,然后再松開左鍵,松開右鍵,好了!標準的右鍵菜單又出來了.
一、禁止點擊鼠標右鍵1:
<SCRIPT language=JavaScript>
<!--
file://鎖鼠標右鍵和鍵盤CONTEXTMENU鍵
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) { alert("歡迎光臨寒舍,有什么需要幫忙的話,請與站長聯系!謝謝您的合作!!!");
oncontextmenu=''return false'';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu=''return false'';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
// -->
</SCRIPT>
二、禁止點擊鼠標右鍵2:
<!--將以下代碼加入HTML的<HEAD></HEAD>之間-->
<script language="javascript">
function click() {
if (event.button==2) {
alert(''歡迎光臨寒舍,有什么需要幫忙的話,請與站長聯系!謝謝您的合作!!!'')
}
}
document.onmousedown=click
</script>
三、跟隨鼠標的花絮
<SCRIPT language=JavaScript>
<!--
file://To add more stars simply add more colours in below array!!
colours=new Array(''ff0000'',''00ff00'',''3366ff'',''ff00ff'',''ffa500'',''ffffff'',''fff000'')
file://Alter nothing below!!
amount=colours.length;
YgetDelay=0,XgetDelay=0,Ydelay=0,Xdelay=0,ns=(document.layers)?1:0,step=0.2,currStep=0,my=0,mx=0;
if (ns){
for (i=0; i < amount; i++)
document.write(''<LAYER NAME="nsstars''+i+''" BGCOLOR=''+colours[i]+'' CLIP="0,0,2,2"></LAYER>'');
}
else{
document.write(''<div id="ie" style="position:absolute;top:0;left:0;"><div style="position:relative">'');
for (i=0; i < amount; i++)
document.write(''<span id="iestars" style="position:absolute;top:0;left:0;width:2px;height:2px;background:''+colours[i]+'';font-size:2px"></span>'');
document.write(''</div></div>'');
}
if (ns){
window.captureEvents(Event.MOUSEMOVE);
function nMouse(evnt){
my=evnt.pageY;mx=evnt.pageX
}
window.onMouseMove=nMouse;
}
else{
function iMouse(){
my=event.y;mx=event.x;
}
document.onmousemove=iMouse
}
function stars(){
if (!ns)ie.style.top=document.body.scrollTop;
for (i=0; i < amount; i++)
{
var layer=(document.layers)?document.layers["nsstars"+i]:iestars[i].style;
layer.top= Ydelay+100*Math.sin((5*Math.sin((currStep-15.99)/10))+i*70)*Math.sin((currStep)/10)*Math.cos((currStep+i*25)/10);
layer.left=Xdelay+180*Math.cos((5*Math.sin((currStep-15.99)/10))+i*70)*Math.sin((currStep)/10)*Math.cos((currStep+i*25)/10);
}
currStep+=step;
}
function delay(){
Ydelay = YgetDelay+=(my-YgetDelay)*1/20;
Xdelay = XgetDelay+=(mx-XgetDelay)*1/20;
stars();
setTimeout(''delay()'',10);
}
delay();
//-->
</SCRIPT>
<SCRIPT type="text/javascript" src="http://bar.baidu.com/ad/popprg.js"></SCRIPT>
<SCRIPT language="JavaScript">
<!--
BaiduWriteAD("zouwenyedg","3");
//-->
</SCRIPT> <img src= http://un.baidu.com/images/st.gif?tn=zouwenye width=0 height=0>