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

JavaScript»ù´¡ÇóÖú

ÊǹØÓÚ×÷ÓÃÓòµÄÎÊÌ⣬´úÂëÈçÏ£º
HTML code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type='text/javascript' src='js/liukai.js'></script>
<script type='text/javascript'>
window.onload = function(){
//var e = document.createEventObject();
var element = document.getElementById('id2');
//element.fireEvent('ok',e);
element.attachEvent('onclick',function(){alert('ok!');});
element.fireEvent('onclick');
}

window.onerror = function(msg,url,line){
if(onerror.num ++ < onerror.max){
alert('·¢Éú´íÎó£º' + msg + '\nµØÖ·£º' + url + '\nÐÐÊý£º' + line);
return true;
}
}
onerror.num = 0;
onerror.max = 3;

</script>
</head>
<body>
<form>
<tr>
<td><input id='id2' type='text' value='asdasd' onclick="alert(forms[forms.length - 1].childNodes.item(2).nodeName);"/></td>
<td></td><a href="#" id="aa">asdasdasdasda</a></td>
</tr>
<


Ïà¹ØÎÊ´ð£º

JavascriptÃèµãÎÊÌâ - Web ¿ª·¢ / JavaScript

ÓÃjavascript¼ÓÔØÒ³ÃæÊ±Ö¸ÏòÒ»¸öÃèµã¡£ÒÑÖªÈçºÎͨ¹ýÁ´½Ó×ö³ÉÃèµãµÄ£¬¿ÉÊÇÏëÈÃÒ³Ãæ¼ÓÔØÊ±Ö±½ÓÖ¸Ïò²»ÐèÒªµã»÷Á´½Ó¡£
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" &quo ......

javascriptÈçºÎ¶ÁÈ¡struts2×ÊÔ´ÎļþÀïµÄÐÅÏ¢

·­¿´ÒÔǰµÄÌû×Ó£¬ÓÃstruts1¿ò¼Ü£¬¿ÉÒÔд³Éalert£¨<bean:message key="name.required"/>£©£»
struts2ÀïûÓÐBean±êÇ©ÁË£¬ÓÚÊdz¢ÊÔÓÃalert(<s:text name="name.required">);
½Å±¾±¨´ ......

¹ØÓÚJavaScriptµÄprototypeºÍinstanceof

JScript code:

function C1(){}
function C2(){}
C2.prototype=new C1();
function C3(){}
C3.prototype=new C2();
var obj=new C3();
function C4(){}
C3.prototype=new C4();
alert(obj insta ......

ÒýÓÃjavascriptÒýÇæ

ÔÚÍøÉÏÕÒµ½µÄÔ´Â룬¿ÉÊÇÖ´Ðв»ÁË£¬Çëǰ±²ÃÇ¿´¿´£¬
Ö´ÐÐ+-*/ÊÇ¿ÉÒÔµÄ
C# code:

using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.CodeDom.Comp ......

IEÀïµÄjavascriptË«»÷ʼþÎÊÌâ

javascriptÔÚIEÀïÁ¬Ðøµã»÷Êó±ê2´Î·¢ÉúµÄʼþ˳ÐòÊÇ£º
mousedown --> mouseup --> click --> mouseup --> dblclick
ÎÒÏ뽫Á¬Ðøµã»÷Êó±ê2´Î·¢ÉúµÄʼþ˳Ðò¸ÄΪ£¨¼´³¹µ×ÆÁ±ÎË«»÷ʼþ£©£º
mousedown --&g ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ