Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavascriptÍøÒ³¼ÆËãÆ÷

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>ÍøÒ³¼ÆËãÆ÷</title>
<style type="text/css">
#container
{
width: 432px;
margin: 0 auto;
text-align: center;
height: 324px;
}
div
{
text-align: left;
width: 400px;
}
input
{
height: 37px;
width: 93px;
margin-bottom: 10px;
background: #CA0;
font-size: 30px;
}
input#answer
{
height: 37px;
width: 381px;
color: #FFF;
font-size: 35px;
text-align: right;
background: #38B;
}
input#equ
{
height: 37px;
width: 190px;
}
input#rst
{
height: 37px;
width: 190px;
}
</style>
<script language="javascript" type="text/javascript">
// ´íÎó´¦Àí
window.onerror = function killerr() {
return true;
}
// ¼ÆËãËùÐèµÄÁ½¸öÒòÊý
var param1, param2;
// ¼ÆËã½á¹û
var answer;
// ÔËËã·û
var oprt;
// ÒòÊý±ê¼Ç
var flag;
// ¼ÆËã²ÎÊý·ÖÅ亯Êý
function doCalc(val) {
if (document.getElementById("answer").getAttribute("value") == "ERROR" && val != "CE") {
// ¼ÆËãÆ÷³ö´íʱÌáʾ£¬²¢ÖÕÖ¹²Ù×÷
alert("Please reset calculator");
return false;
}
switch (val) {
// ²Ù×÷·û
case "+":
case "-":


Ïà¹ØÎĵµ£º

JavaScript »ñÈ¡¶ÔÏóµÄ¸ß¶ÈºÍ¿í¶ÈÏêϸ˵Ã÷

scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......

ÕýÔò±í´ïʽÔÚphp£¬java£¬javascriptÖзֱðÓ¦ÓÃ

ÔÚjavascriptÖÐÓ÷¨¾ÙÀý
var rule = /^\d+$/;
if(!rule.test(addform.rmb_price.value)) {
alert('rmb_price must be number');
addform.rmb_price.focus();
return false;
}
ÔÚphpÖÐÓ÷¨¾ÙÀý
$aa = "/^\d+$/";
if(preg_match($aa, "111")) {
echo "found";
}
ÔÚjavaÖÐÓ÷¨¾ÙÀý ......

JavaScriptÈçºÎ»ñµÃinputÔªËØvalueÖµ

ÔÚÒ³ÃæÖÐÎÒÃÇ×î³£¼ûµÄÒ³ÃæÔªËؾÍÊÇinputÁË£¬µ«ÊÇÎÒÃÇÈçºÎÓÃJavaScriptµÃµ½ÍøÒ³inputÖÐÊäÈëµÄvalueÖµÄØ£¬ÆäʵºÜ¼òµ¥£¬·½·¨Ò²²»Ö¹Ò»ÖÖ£¬¾ÝÎÒ×ܽá±È½Ï³£ÓõľÍÊÇÏÂÃæµÄÁ½ÖÖ·½·¨£¬Ïл°²»¶à˵ÁË£¬ÏÂÃæÄǾÍÀ´¿´¿´ÎÒ˵µÄ·½·¨°É£º
·½·¨Ò»¡¢



  function print(){
   var a=myform. ......

javascriptµ¥ÒýºÅºÍË«ÒýºÅÇø±ð

javascriptµ¥ÒýºÅºÍË«ÒýºÅÇø±ð2009-08-27 10:13ÔÚÒ»¸öÍøÒ³Öеİ´Å¥£¬Ð´onclickʼþµÄ´¦Àí´úÂ룬²»Ð¡ÐÄд³ÉÈçÏ£º

IEÌáʾ³ö´íºó£¬ÔÙÂþ²»¾­ÐĵظÄΪ£º

½á¹û»¹Êdzö´í¡£
Õâʱ£¬ÎÒ¾ÍÏ벻ͨÁË£¬ËäÈ»ÎÒÖªµÀ×îÖ±½ÓµÄ½â¾ö·½·¨ÊÇд³ÉÕâÑù£º

µ«ÎªÊ²Ã´javascriptÖеÄתÒå×Ö·û\ûÓÐЧ¹ûÁËÄØ ......

Javascriptµ¥Àýģʽ

ExtJS Éè¼Æģʽ Ö®Ò» £¨µ¥Àý£©
    Extjs ·¢Õ¹ÖÁ½ñ£¬´«³ÐÁËYUIµÄΰ´ó¾«Ë裬 YUIµÃµ½ÁËDouglas Crockford£¨ÈÎÖ°ÓÚ Yahoo! µÄÒ»Ãû JavaScript ´«µÀÕߺͼܹ¹Ê¦£¬ËûÊÇÈ«Çò×îÓÐÔìÒèµÄ JavaScript ÓïÑÔר¼ÒÖ®Ò»£¬Blog£ºhttp://www.crockford.com/) ´óʦµÄÔÞͬ,¶øExtJSÒ²Êǽ«YUIµÄģʽ½Å±¾±à³ÌѧϰʹÓõÄÁÜÀ쾡Ö£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ