javascript ÏÂÀ¿ò£¨select)Ñ¡ÔñÓ뱻ѡÔñ
<html>
<head>
<mce:script type = "text/javascript"><!--
function changetext()
{
var x = document.getElementById("list");
for (var i = 0;i < x.length;i++ )
{
if (x.options[i].selected)
{
document.getElementById("text").value = x.options[i].text;
break;
}
}
}
function changelist()
{
var x = document.getElementById("list");
for (var i = 0;i <x.length ;i++)
{
if (document.getElementById("text").value == x.options[i].text)
{
x.options[i].selected =true;
}
}
}
// --></mce:script>
</head>
<body>
<input type = "text" id = "text" >
<input type = "button" value = "changelist" onclick = "changelist();">
<select id = "list" onchange= changetext();>
<option >1</option>
<option >2</option>
<option >3</option>
<option >4</option>
<option >5</option>
<option >6</option>
<option >7</option>
<option >8</option>
<option >9</option>
<option >10</option>
</select>
</body>
</html>
Ïà¹ØÎĵµ£º
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy=& ......
JavaScript µÄ³É¹¦ÈÃÈ˽ò½òÀÖµÀ£¬Îª Web ÍøÒ³±àд JavaScript ´úÂëÒѾÊÇËùÓÐ Web Éè¼ÆʦµÄ»ù±¾¹¦£¬ÕâÃÅÓÐȤµÄÓïÑÔÔ̲Ø×ÅÐí¶à²»ÎªÈËÊìÖªµÄ¶«Î÷£¬¼´Ê¹¶àÄêµÄ JavaScript ³ÌÐòÔ±£¬Ò²Î´ÄÜÍêÈ«³Ô͸¡£±¾ÎÄ´Ó7¸ö·½Ãæ½²Êö JavaScript ÖÐÄÇЩÄã²»ºÜÊìÖªµ«·Ç³£ÊµÓõļ¼ÇÉ¡£
¼òÂÔÓï¾ä
JavaScript ¿ÉÒÔʹÓüòÂÔÓï¾ä¿ìËÙ´´½¨¶ÔÏóºÍÊý× ......
1 Ò»ÆðÀ§»óʼÓÚ±äÁ¿µÄ×÷ÓÃÓò
ÇëÏÈ¿´ÏÂÃæµÄ´úÂ룺
ʾÀý1£º
var message = " this is a very simple function ";
function simpleFunc(){
alert(message);
}
±³ºóµÄµÀÀí´ó¼Ò¶¼¶®£¨Èç¹û²»¶®µÄ¿ÉÒÔÏȱðÍù ......
1. ÈÃÎÄ×Ö²»Í£µÄ¹ö¶¯¡£
<marouee>¹ö¶¯ÎÄ×Ö</marouee>
2.¼Ç¼²¢ÏÔʾÍøÒ³µÄ×îºóÐÞ¸Äʱ¼ä
<script language="javascript">
doucument.write("×îºó¸üÐÂʱ¼ä£º" + document.lastModified + " " ......
JavaScript µÄ³É¹¦ÈÃÈ˽ò½òÀÖµÀ£¬Îª Web ÍøÒ³±àд JavaScript ´úÂëÒѾÊÇËùÓÐ Web Éè¼ÆʦµÄ»ù±¾¹¦£¬ÕâÃÅÓÐȤµÄÓïÑÔÔ̲Ø×ÅÐí¶à²»ÎªÈËÊìÖªµÄ¶«Î÷£¬¼´Ê¹¶àÄêµÄ JavaScript ³ÌÐòÔ±£¬Ò²Î´ÄÜÍêÈ«³Ô͸¡£±¾ÎÄ´Ó7¸ö·½Ãæ½²Êö JavaScript ÖÐÄÇЩÄã²»ºÜÊìÖªµ«·Ç³£ÊµÓõļ¼ÇÉ¡£
¼òÂÔÓï¾ä
JavaScript ¿ÉÒÔʹÓüòÂÔÓï¾ä¿ìËÙ´´½¨¶ÔÏóºÍÊý× ......