作为标题,如何在javascript中进行ckecking? 谢谢!
解决方案Cylix写道: 作为标题,如何在javascript中进行ckecking? 谢谢!
var links = document.links; for(var i = 0; i< links.length; i ++) { //点击此处查看具体链接 // //示例: // if(links [i]!= null) // { // alert(链接存在:)); //休息; //} }
marss写道2007年2月1日在comp.lang.javascript : > Cylix写道: >作为标题,如何在javascript中进行ckecking?谢谢!
var links = document.links; for(var i = 0; i< links.length; i ++) { //点击此处查看具体链接 // //示例: // if(links [i]!= null) // { // alert(链接存在:)); //休息; //} }
我认为OP想要在线测试网站的存在。 测试你知道应该在那里的图像。 < img src = ''iacnn/cnn/2007/WORLD/europe/02/01/blair.police/t1.blair.ap.jp g'' onload =''alert(" cnn found")'' onerror =''alert(" cnn not found")''
>- Evertjan。 荷兰。 (请更改在我的电子邮件地址中的点数x)来自
" Evertjan。 < ex ************** @ interxnlwrote in message news:Xn **************** **** @ 194.109.133.242 ... marss于2007年1月1日在comp.lang.javascript中写道 : >> Cylix写道: >>作为标题,如何用javascript做ckecking?谢谢!
var links = document.links; for(var i = 0; i< links.length; i ++) // //点击此处查看具体链接 // //示例: // if(links [i]!= null) // { // alert( 存在一个链接:)"); // break; //} }
我认为OP想要在线测试网站的存在。 测试你知道的图像应该在那里。 < img src = ''iacnn/cnn/2007/WORLD/europe/02/01/blair.police/t1.blair.ap.jp g'' onload =''alert(" cnn found")'' onerror =''alert(" cnn not found" ;)''
你以格式化标记的方式杀了我。 (不错!) 哦,顺便说一下,JSWorld不再是一个JavaScript网站了。 -Lost
As the title, How to do the ckecking in javascript? Thanks!
解决方案 Cylix wrote: As the title, How to do the ckecking in javascript? Thanks!var links = document.links; for(var i = 0; i < links.length; i++) { //check here for specific link // //Example: //if (links[i] != null) //{ // alert("A link exists :)"); // break; //} }
marss wrote on 01 feb 2007 in comp.lang.javascript: > Cylix wrote: >As the title, How to do the ckecking in javascript?Thanks!var links = document.links; for(var i = 0; i < links.length; i++) { //check here for specific link // //Example: //if (links[i] != null) //{ // alert("A link exists :)"); // break; //}}
I think that the OP wants to test the existence of a website on line. Test for an image you know should be there. <img src= ''i.an/cnn/2007/WORLD/europe/02/01/blair.police/t1.blair.ap.jp g'' onload=''alert("cnn found")'' onerror=''alert("cnn NOT found")''
>-- Evertjan. The Netherlands. (Please change the x''es to dots in my emailaddress)
"Evertjan." <ex**************@interxnlwrote in message news:Xn********************@194.109.133.242... marss wrote on 01 feb 2007 in comp.lang.javascript: >>Cylix wrote: >>As the title, How to do the ckecking in javascript?Thanks!var links = document.links;for(var i = 0; i < links.length; i++){ //check here for specific link // //Example: //if (links[i] != null) //{ // alert("A link exists :)"); // break; //}}
I think that the OP wants to test the existence of a website on line. Test for an image you know should be there. <img src= ''i.an/cnn/2007/WORLD/europe/02/01/blair.police/t1.blair.ap.jp g'' onload=''alert("cnn found")'' onerror=''alert("cnn NOT found")''
You kill me the way you format your markup. (Not a bad thing!) Oh and by the way, JSWorld is not a JavaScript site anymore. -Lost
更多推荐
如何检查链接的存在?
发布评论