瑞鲁手机APP下载网_专注推荐好用的手机APP和游戏APP

免登录/免积分下载CSDN资料 Javacript就搞定

免登录/免积分下载CSDN资料 Javacript就搞定

查看人次:1摘自:瑞鲁游戏APP

下载CSDN的资料一直是比较悲剧的事 又要登录有用扣积分 不过现在你不需要这些了 不过应该不多久又会被和谐...呵呵

可以先试下这个地址:http://download.csdn.net/source/2735830然后将最后的地址2735830带人下面这个网址替换最后的“*”:http://download.csdn.net/index.php/rest/source/getsourceinfo/*现在附上一个可DIY直接下载的工具 将下面的代码以html格式保存到本地:转载自 玉鼎真人B 

<script language=javascript type="text/javascript">function creatAjax(){ if(typeof XMLHttpRequest!="undefined"){returnnew XMLHttpRequest();}elseif(typeof ActiveXObject!="undefined"){var xmlHttp_ver =false;var xmlHttp_vers =["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp","Microsoft.XmlHttp"];if(!xmlHttp_ver){for(var i=0;i<xmlHttp_vers.length;i++){try{new ActiveXObject(xmlHttp_vers[i]);xmlHttp_ver = xmlHttp_vers[i];break;}catch(oError){;}}}if(xmlHttp_ver){returnnew ActiveXObject(xmlHttp_ver);}else{thrownew Error("");}}else{thrownew Error("");}}function page(id){id = id.replace(/:\//g, ").split("/")[3];var url ="http://download.csdn.net/index.php/rest/source/getsourceinfo/"+ id;var xmlhttp = creatAjax();xmlhttp.open("get", url,true);xmlhttp.onreadystatechange =function(){if(xmlhttp.readyState ==4&& xmlhttp.status ==200){var page = xmlhttp.responseText;var su = document.getElementById('su');var x = page.indexOf("\",\"url\":\"http:");var y = page.indexOf("\"}");var url = page.substring(x +9, y).replace(/\\/g,"");window.top.location=url;}}xmlhttp.send(null); }</script><center><code lang="php"><code lang="php"><code lang="php"><code lang="php"><br />请键入链接:<input id="sun" size="80" type="text" value=""/><input onclick="page(document.getElementById('sun').value)" type="submit" value="下载"/></center>

 

以上代码请用IE打开 因为用到ajax 需要本地打开才能跨域好了 直接输入地址下载吧...懒得保存的 可以直接下载写好的html文件:http://u.115.com/file/f717f4dfe4csdnget.html

相关文摘:教你一招 CSDN|Javacript技巧|下载技巧
标题名称:《免登录/免积分下载CSDN资料 Javacript就搞定》
本文网址:https://www.sdruilu.cn/news/tpart-48996.html