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
Ïà¹ØÎĵµ£º
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="return false;" oncut="re ......
Òý×Ó
±à³ÌÊÀ½çÀïÖ»´æÔÚÁ½ÖÖ»ù±¾ÔªËØ£¬Ò»¸öÊÇÊý¾Ý£¬Ò»¸öÊÇ´úÂë¡£±à³ÌÊÀ½ç¾ÍÊÇÔÚÊý¾ÝºÍ´úÂëǧ˿ÍòÂƵľÀ²øÖгÊÏÖ³öÎÞÏÞµÄÉú»úºÍ»îÁ¦¡£
Êý¾ÝÌìÉú¾ÍÊÇÎľ²µÄ£¬×ÜÏë±£³Ö×Ô¼º¹ÌÓеı¾É«£»¶ø´úÂëÈ´ÌìÉú»îÆã¬×ÜÏë¸Ä±äÕâ¸öÊÀ½ç¡£
Äã¿´£¬Êý¾Ý´úÂë¼äµÄ¹ØϵÓëÎïÖ ......
Ò»¡¢ ÔÚ×Ô¶¨ÒåcssÑùʽÖÐÊäÈë </style> ½«css´úÂë¶Î½áÊø£»
¶þ¡¢ ÔÚ </style> ºóÃæÊäÈë <script type="text/javascript" language="javascript">js´úÂë</script>£»
Èý¡¢ ±£´æÅäÖþͿÉÒÔÓÐÄãÊäÈëµÄjsÌØЧÀ²¡£
ÓÉÓÚ±¾È˶Ôjs²»ÊǺÜÊìϤ£¬ÕâÀï¾Í²»Ð´Àý×ÓÁË£¬Ï£Íû ......
JavaScriptÊÇÓÉNetscape¿ª·¢µÄ¹ã·ºÓÃÓÚÊý°ÙÍòÍøÒ³ºÍ·þÎñÆ÷Ó¦ÓóÌÐòµÄ¶ÔÏó½Å±¾ÓïÑÔ¡£NetscapeµÄJavaScriptÊÇECMA-262µÚÈý°æ(ECMAScript)±ê×¼½Å±¾ÓïÑÔµÄÒ»¸ö³¬¼¯£¬Ö»Óë·¢Ðбê×¼ÓÐЩÐí²»Í¬£¨mild differences£©¡£
Óë¹ã·ºµÄÎó½âÏà·´£¬JavaScript²»ÊÇ“½âÊÍÐ͵ÄJava”¡£×¼È·µÄ˵£¨In a nutshell£©£¬JavaScriptÊÇÖ§³Ö ......
//״̬À¸·ÉÈëÎÄ×Ö
function statusMessageObject(p,d) { <!--????????????-->
this.msg = MESSAGE
this.out = " "
this.pos = POSITION
this.delay = DELAY
this.i = 0
this.reset = clearMessage
}
function clearMessage( ......