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

JavaScript TextBoxÊäÈëÊý×Ö¿ØÖÆ

var OnPasteCheckIntNum = function()
{
    if(window.clipboardData)
    {
        if(isNaN(window.clipboardData.getData('text')))
        {
            clipboardData.setData('text','');
        }
        else
        {
            //clipboardData.setData('text',clipboardData.getData('text'))
            clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))
        }
    }
    else if(navigator.userAgent.indexOf("Opera") != -1)
    {
        if(isNaN(window.location))
        {
            //window.location = window.location.replace(/[^\d]/g,'');
            window.location = '';
        }
    }
};
var OnPasteCheckDecimal = function(id)
{   
    return function()
    {
        if(window.clipboardData)
        {
            if(isNaN(window.clipboardData.getData('text') + id.value))
            {
                clipboardData.setData('text','');
            }
     &n


Ïà¹ØÎĵµ£º

Javascript »ñÈ¡ÍøÒ³¸÷¸ß¶È²ÎÊý

 <SCRIPT   LANGUAGE="JavaScript"> 
  var     s   =   ""; 
  s   +=   "\r\nÍøÒ³¿É¼ûÇøÓò¿í£º"+   document.body.clientWidth; 
  s   +=   "\r\nÍøÒ³¿É¼ûÇøÓò¸ß ......

javascript µÄ×÷ÓÃÓò¼°È«¾Ö±äÁ¿(zhuan)

±¾ÎIJο¼×Ô£ºhttp://www.cnblogs.com/mophee/archive/2009/03/15/1412590.html
¿´µ½Ò»²©¿ÍÀï̽ÌÖjavascript Àï×÷ÓÃÓòµÄÎÊÌâ
Àý×Ó1£º
var tt = 'aa';
function test(){
    alert(tt);
    var tt = 'dd';
    alert(tt);
}
test();
Àý×Ó2£º
var tt = 'aa';
funct ......

javascriptÊ®½øÖÆת¶þ½øÖÆ£¬¶þ½øÖÆתʮ½øÖÆ


alert(parseInt("101101", 2))

ÔËÐдúÂë

function toBin(intNum) {
var answer = "";
if(/\d+/.test(intNum)) {
while(intNum != 0) {
answer = Math.abs(intNum%2)+answer;
intNum = parseInt(intNum/2);
}
......

JavaScript¼ò½é

JavaScript         ECMAScriptÊÇÕâ¸ö½Å±¾ÓïÑԵıê×¼»¯°æ±¾¡£ ScriptÔªËØ£º             ÔÚHTML´úÂëÖÐÌí¼ÓJavaScript´úÂë             Ò²¿ÉÒ԰ѽű¾´úÂë·ÅÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ