显示页面内的所有链接 - 中国WEB开发者网络 (http://www.webasp.net) -- 网页特效 (http://www.webasp.net/javascript/) --- 显示页面内的所有链接 (http://www.webasp.net/javascript/1/331.htm) |
| -- 发布日期: 2005-06-03 |
| <!-- 网页特效代码由[中国WEB开发者网络:http://www.ChinaWebDev.com]提供! --> <!-- 要实现此效果需要 1 个步骤: --> <!-- 第 1 步: --> <!-- 把下面的代码加到<BODY></BODY>区域中: --> <script language="JavaScript1.2"> <!-- function extractlinks(){ var links=document.all.tags("A") var total=links.length var win2=window.open("","","menubar,scrollbars,toolbar") win2.document.write("<font size='2'>一共有"+total+"个连接</font><br>") for (i=0;i<total;i++){ win2.document.write("<font size='2'>"+links[i].outerHTML+"</font><br>") } } //--> </script> <input type="button" onClick="extractlinks()" value="显示所有的连接"> <a href="http:/www./webasp.net" target=_blank>www.webasp.net</a> <a href="http://www.ewebsoft.com" target=_blank>www.ewebsoft.com</a> |
| webasp.net |