javascript(±ØÐëÊäÈë¹Ø¼ü×Ö²ÅÄܵã»÷³É¹¦)
<SCRIPT LANGUAGE="JavaScript">
<!--
function limitNum(obj) {
if(obj.value.replace(/\s/g,"")==""||obj.value.replace(/\s/g,"")=="ÊäÈë¹Ø¼ü×Ö") {
alert('ÇëÊäÈë¹Ø¼ü×Ö')
return false;
}
}
//-->
</SCRIPT>
<form action="123.p" method="post" name="form1" id="form1" onSubmit="return limitNum(searchKeyword)">
<select name="searchContent" style='font-size:9pt;'>
<option value="newsAll">·¢´óË®</option>
<option value="title">·¢Éú</option>
<option value="author">·¢</option>
<option value="content">·¢</option>
</select>
<input type="text" name="searchKeyword" value="ÊäÈë¹Ø¼ü×Ö" onFocus="this.value=''" style='font-size:9pt;' size="9" maxlength="50" />
<input type="submit" name="submit" value="·½·¨" />
</form>
Ïà¹ØÎĵµ£º
±ê×¼µÄWeb ×é³ÉÓ¦¸Ã°üÀ¨3 ²¿·Ö£º½á¹¹¡¢ÐÐΪºÍ±íÏÖ¡£ÕâÖÖ˼Ïë×îÔçÔÚ΢ÈíÉè¼ÆµÄ
DHTMLÄ£ÐÍÖгõ²½Ìá³öÀ´£¬µ«ÊǺܲ»¹æ·¶£¬Ò²²»³Éϵͳ¡£ºóÀ´£¬W3C£¨World Wide Web
Consortium£¬ÍòάÍøÁªÃË£©×éÖ¯¹æ·¶ÁËWeb µÄ¹¹³É¡£¸ù¾ÝW3C Öƶ©µÄ±ê×¼£¬Web ±ê×¼²»
ÊÇijһ¸ö±ê×¼£¬¶øÊÇһϵÁбê×¼µÄ¼¯ºÏ¡£ÍêÕûµÄWeb Ó¦¸ÃÓÉÒÔÏÂ3 ²¿·Ö×é³É£º
½á ......
Ê×ÏÈ¿´demo´úÂ룺
var student={
name:"leo",
intro:function(){
alert("my name is "+this.name);
}
}
var teacher=function(f){
f();
}
teacher(student.intro);
ÔÚÉÏÃæµÄdemo£¬¿ÉÒÔ¿´µ½ÏÔʽµÄ¶¨ÒåÁËÒ»¸ö¶ÔÏóstudent£¬ÓÐÒ»¸ö³ÉÔ±º¯ÊýintroºÍÒ»¸ö³ÉÔ±±äÁ¿¡£
ÁíÍⶨÒåÁËÒ»¸öº¯Êýteacher£¬½ÓÊ ......
²ãµÄ¿ª·¢ÔÚʵ¼ÊÓ¦ÓÃÖбȽÏÖØÒª£¬±ÈÈçƯ¸¡¹ã¸æµÈµÈ£¬ÎÒÕâÀï¼òµ¥Ì½ÌÖһϡ£
1. ¿ØÖƲãµÄÏÔʾ»òÒþ²Ø
Á½ÖÖ°ì·¨£¬Æäʵ¶¼ÊÇ¿ØÖÆÑùʽµÄ¡£
°ì·¨Ò»£º¿ØÖÆ display ÊôÐÔ
<script language="javascript">
function show(status)
{
document.getElemen ......
javascript ÀඨÒå4ÖÖ·½·¨
Java´úÂë
/*
¹¤³§·½Ê½--- ´´½¨²¢·µ»ØÌض¨ÀàÐ͵ĶÔÏóµÄ ¹¤³§º¯Êý £¨ factory function £©
*/
function createCar(color,doors,mpg){
......
½Å±¾ÖеÄʼþÓÐ2ÖÖÄ£ÐÍ
1¡¢ ðÅÝÐÍʼþ£ºÊ¼þÊÇ°´ÕÕ´Ó×îÌض¨µÄÄ¿±êµ½×î²»Ìض¨µÄʼþÄ¿±ê(document)µÄ˳ÐòÒÀ´Î´¥·¢¡£ÕâÊÇÕë¶Ô²»Í¬ÔªËصÄͬһʼþÀàÐÍ
È磺
<html onclick=”handleClick()”>
<head></head>
<body onclick=”handleClick()”>
<div ......