javascript ÅжÏÎļþÊÇ·ñ´æÔÚ ÕûÀí
javascript ÅжÏÎļþÊÇ·ñ´æÔÚ
<title>³£ÓÃÏÂÔØ</title>
<script type="text/javascript" >
//ÅжϷþÎñÆ÷ÉϵÄÎļþ£¨ÍøÂçÎļþÊÇ·ñ´æÔÚ£©
function getURL()
{
var objDiv=document.getElementById ("show");
var objs=objDiv.childNodes;
for(var i=0;i<objs.length;i++)
{
if(objs.tagName=="A")
{
var objA=objs;
var url=objA.href;
var xmlhttp =new ActiveXObject("microsoft.XMLHTTP");
xmlhttp.open("HEAD",url,false);
xmlhttp.send();
if(xmlhttp.readyState==4)
&nbs
Ïà¹ØÎĵµ£º
Ä£·ÂjQuey£¬´´½¨¼¸¸ö°ü¹ü½ÚµãµÄ·½·¨£¬·¢ÏÖjQueryµÄ·½·¨ºÜµÍЧ°¡£¬ÏÂÒ»´ÎËûÓÖ¿ÉÒÔ˵Õ⼸¸ö·½·¨¿ÉÒÔÌáÉýÁ˶àÉÙ¶àÉÙÁË¡£ÔÀí»ù±¾ÊÇÕâÑù£¬Èç¹û´«ÈëµÄÊÇ×Ö·û´®£¬ÄÇôÈÃËüÃDZä³ÉÒ»¸öÔªËؽڵ㣬²»¹ýÕâÔªËؽڵãÒ²¿ÉÒÔÓÐÐí¶à²ã£¬ÔÚ×îÄÚ²ã°ÑÒª°ü¹üµÄÔªËطŽø¡£°Ñ×Ö·û´®±ä³ÉÔªËؽڵãµÄ·½·¨ÓÐÈçϼ¸¸ö¡£1£¬createElement£¬IE¿ÉÒÔÁ¬ÔªËØÊ ......
//´´½¨Ò»¸öеÄÔªËؽڵ㣬ԪËØÃûʹÓÃsTagName¶¨Òå
oElementNode = document.createElementNode(sTagName);
//´´½¨Ò»¸öеĽڵ㣬½ÚµãÃûʹÓÃsTextValue¶¨Òå
oTextNode = document.createTextNode(sTextValue);
//ΪԪËظ³Ò»¸öеÄÊôÐÔ£¬ÊôÐÔÃûʹÓÃsName
oAttribute = document.createAttribute(sName);
//´´½¨Ò»¸öÐ嵀 ......
JavaScript ¿ÉËãÊÇÊÀ½çÉÏ×îÁ÷Ðеıà³ÌÓïÑÔ£¬ËüÔø±» Web ¿ª·¢Éè¼ÆʦÌùÉÏجÃεıêÇ©£¬ËäÈ»ÕæÕýµÄجÃÎÆäʵÊÇ DOM API£¬Õâ¸ö±»´óÁ¿µÄ¿ª·¢ÓëÉè¼ÆʦËæÊÖÄéÀ´ÔöÇ¿ËûÃÇµÄ Web Ç°¶ËµÄ½Å±¾ÓïÑÔ£¬Èç½ñÔ½À´Ô½±»ÖØÊÓ£¬ËäÔòÈç´Ë£¬JavaScript ÈÔȻӵÓкܶàÈÃÈ˷ѽâµÄ¶«Î÷¡£
1. ËüÒÔ Java ÃüÃû£¬µ«²¢²»ÊÇ Java
Ëü×î³õ½Ð Mocha£¬ ½ÓןÄÃûÎ ......
ÔÚÒ»¸öÍøÒ³Öеİ´Å¥£¬Ð´onclickʼþµÄ´¦Àí´úÂ룬²»Ð¡ÐÄд³ÉÈçÏ£º
<input value="Test" type="button" onclick="alert(""OK"");" />
IEÌáʾ³ö´íºó£¬ÔÙÂþ²»¾ÐĵظÄΪ£º
<input value="Test" type="button" onclick="alert(\"OK\");" />
½á¹û»¹Êdzö´í¡£
Õâʱ£¬ÎÒ¾ÍÏ벻ͨÁË£¬ËäÈ»ÎÒÖªµÀ×îÖ±½ÓµÄ½â¾ö·½·¨ ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>ÓÃjavascript¶¯Ì¬Ìí¼Óɾ³ýhtmlÔªËØ</title>
<script type="text/javascript"><!--
function $(nodeId) {
re ......