javascript¶ÁÈ¡xmlʵÏÖÓ¦ÓóÌÐò²Ëµ¥Ð§¹û
/*Ñùʽ*/
<style type="text/css">
td{font-size:12px;}
.item{text-decoration:none;width:100%;height:100%; line-height:22px;cursor:default;color:Black;vertical-align:middle}
.staticTab{cursor:default;height:22px}
.staticTD{width:70px;text-align:center; vertical-align:middle;white-space:nowrap}
.dynamicTR{height:22px; vertical-align:middle}
.dynamicTab{width:60px;cursor:default;background-color:#ccebff;position:absolute;z-index:1}
.dynamicTDRight{text-align:right;font-size:9px;}
.dynamicTDCenter{text-align:left;white-space:nowrap}
</style>
/*--------------²Ëµ¥Ó¦Óõ½µÄjs--------------------*/
var menuHTML="";
function createXMLHttpRequest(){xmlHttp=(window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();}
function getMenuData(){//´ÓºóÌ«»ñȡͷ²¿µÄµ¥¾Ý»òÉóÅúÈ˵ȵÄÐÅÏ¢
createXMLHttpRequest();
xmlHttp.open("GET","Menu.ashx?id="+(new Date()).getTime(),true);
xmlHttp.onreadystatechange=getMenu_onreadystatechange;//Óú¯ÊýÃû,²»¼ÓÀ¨ºÅ.
xmlHttp.send(null);
}
function getMenu_onreadystatechange(){//ÏàÓ¦´¦Àí
if(xmlHttp.readyState==4){
if(xmlHttp.status==200){
var menuXML=xmlHttp.responseXML.getElementsByTagName("menu");//childNodes
createStaticMenu(menuXML[0]);
}else
alert('·þÎñÆ÷¶Ë·¢Éú´íÎó!');
}
}
function getId(number,fatherId){
number+=1;
if(number<1
Ïà¹ØÎĵµ£º
var myDate = new Date();
myDate.getYear(); //»ñÈ¡µ±Ç°Äê·Ý(2λ)
myDate.getFullYear(); //»ñÈ¡ÍêÕûµÄÄê·Ý(4λ,1970-????)
myDate.getMonth(); //»ñÈ¡µ±Ç°Ô·Ý(0-11,0´ú±í1 ......
ÐèÇó£ºÄ£Äâ±íµ¥Ìá½»²¢¿ÉÉèÖÃÌá½»¼ä¸ô
»¹ºÃÒ³ÃæÊÇajaxÌá½»µÄ£¬Ö»ÒªÐ´¸öjs¶¨Ê±Ìá½»¾ÍokÁË¡£ ÓÚÊÇÕÒÁ˼¸¸öдµÄÀàËÆÓÚsleepµÄ¹¦ÄÜ£¬ÄùýÀ´ÓÃÓ÷¢ÏÖÒ²²»ÊǺܺÃÓá£
×ÔÒÑдÁ˸ö
<script language="javascript">
var base = {};
......
base.auto_submit = function(){
var total = 10 ......
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
//µ¼ÈëʹÓÃxmlÓ¦ÓÃËùÐèµ ......
ÔÚ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ÖÐÓ÷¨¾ÙÀý ......
• Сд½ð¶îÓë´óд½ð¶îÁª¶¯
<mce:script language="JavaScript"><!--
function daxie()
{
this.values = ["Áã", "Ò¼", "·¡", "Èþ", "ËÁ", "Îé", "½", "Æâ", "°Æ", "¾Á"];
this.digits = ["", "ʰ", "°Û", "Ǫ"];
}
function daxie.prototype.getdx(num)
{
if(isNaN(num)) return "";
var number = ......