<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="css/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>北京web前端培训班 - javascript外包</title><link>http://www.35ui.cn/</link><description>web前端培训机构 - </description><generator>RainbowSoft Studio Z-Blog 1.8 Arwen Build 90619</generator><language>zh-CN</language><copyright>北京web前端外包开发公司</copyright><pubDate>Thu, 30 Apr 2026 04:51:40 +0800</pubDate><item><title>数组倒序-js数组倒序reverse</title><author>04xiaoming@163.com (xiaoming)</author><link>http://www.35ui.cn/post/20200413710.html</link><pubDate>Mon, 13 Apr 2020 16:55:06 +0800</pubDate><guid>http://www.35ui.cn/post/20200413710.html</guid><description><![CDATA[<p>&nbsp;</p><div>&nbsp;</div><div>var a = [&quot;前端开发&quot;,&quot;前端&quot;,&quot;数组倒序&quot;]; //创建数组</div><div>&nbsp;</div><div>&nbsp;</div><div>alert(a.reverse()); //颠倒顺序并输出</div>]]></description><category>javascript外包</category><comments>http://www.35ui.cn/post/20200413710.html#comment</comments><wfw:comment>http://www.35ui.cn/</wfw:comment><wfw:commentRss>http://www.35ui.cn/feed.asp?cmt=2567</wfw:commentRss><trackback:ping>http://www.35ui.cn/cmd.asp?act=tb&amp;id=2567&amp;key=ab709fc0</trackback:ping></item><item><title>document.referrer-js获取访问来源路径</title><author>04xiaoming@163.com (xiaoming)</author><link>http://www.35ui.cn/post/20180408888.html</link><pubDate>Sun, 08 Apr 2018 11:17:35 +0800</pubDate><guid>http://www.35ui.cn/post/20180408888.html</guid><description><![CDATA[<p><span style="color: rgb(255, 0, 0);"><strong>&nbsp;一、JS获取前一个访问页面的URL地址document.referrer</strong></span></p><div>要获取前一个访问页面的URL地址前后端语言都可以，例如PHP的是$_SERVER['HTTP_REFERER']，JavaScript的就是document.referrer。</div><div>我们平常开发，虽然和URL打交道也算比较频繁，但是，似乎很少使用document.referrer。我起初以为是兼容性不好，后来测试发现ie7都支持，那就奇怪了，为何document.referrer用的不多呢？</div>...]]></description><category>javascript外包</category><comments>http://www.35ui.cn/post/20180408888.html#comment</comments><wfw:comment>http://www.35ui.cn/</wfw:comment><wfw:commentRss>http://www.35ui.cn/feed.asp?cmt=2547</wfw:commentRss><trackback:ping>http://www.35ui.cn/cmd.asp?act=tb&amp;id=2547&amp;key=20524488</trackback:ping></item><item><title>JS中的location属性和方法总结</title><author>04xiaoming@163.com (xiaoming)</author><link>http://www.35ui.cn/post/20180406874.html</link><pubDate>Fri, 06 Apr 2018 15:34:42 +0800</pubDate><guid>http://www.35ui.cn/post/20180406874.html</guid><description><![CDATA[<p>&nbsp;location属性一般引用自Location对象，可以用于获取或者设置当前的URL。&nbsp;window.location === document.location; &nbsp;//true &nbsp;均引用自Location对象；&nbsp;URL的一般组成包括：&nbsp;eg: protocol://[user[:password]@]hostname:[port][</p>]]></description><category>javascript外包</category><comments>http://www.35ui.cn/post/20180406874.html#comment</comments><wfw:comment>http://www.35ui.cn/</wfw:comment><wfw:commentRss>http://www.35ui.cn/feed.asp?cmt=2546</wfw:commentRss><trackback:ping>http://www.35ui.cn/cmd.asp?act=tb&amp;id=2546&amp;key=567d7b9a</trackback:ping></item><item><title>window.open()与window.location.href的区别</title><author>04xiaoming@163.com (xiaoming)</author><link>http://www.35ui.cn/post/20180406312.html</link><pubDate>Fri, 06 Apr 2018 15:25:28 +0800</pubDate><guid>http://www.35ui.cn/post/20180406312.html</guid><description><![CDATA[<p>&nbsp;window.open()与window.location.href的区别</p><div>window.open(&quot;index.html&quot;,'top'); 只是表示打开这个页面，并不是打开并刷新index.html</div><div>window.location.href=&quot;index.html&quot;; 表示重新定向到新页面，同时刷新打开的这个页面；</div><div>eg：</div><div>&lt;tr&gt;&lt;td style=&quot;width:96%;&quot;&gt;进行中项目&lt;/td&gt;&lt;td&gt;&lt;img alt=&quot;&quot; src=&quot;Images/demo.gif&quot; style=&quot;text-align:right;cursor:hand;&quot;&nbsp;onclick=&quot;javascript:window.open('test.html?flag=0','_top');&quot;/&gt;&lt;/td&gt;&lt;/tr&gt; &nbsp;</div>...]]></description><category>javascript外包</category><comments>http://www.35ui.cn/post/20180406312.html#comment</comments><wfw:comment>http://www.35ui.cn/</wfw:comment><wfw:commentRss>http://www.35ui.cn/feed.asp?cmt=2545</wfw:commentRss><trackback:ping>http://www.35ui.cn/cmd.asp?act=tb&amp;id=2545&amp;key=2e389c04</trackback:ping></item><item><title>JS获取当前页面的URL</title><author>04xiaoming@163.com (xiaoming)</author><link>http://www.35ui.cn/post/20180330700.html</link><pubDate>Fri, 30 Mar 2018 22:31:29 +0800</pubDate><guid>http://www.35ui.cn/post/20180330700.html</guid><description><![CDATA[<p>&nbsp;var url;</p><div>&nbsp;</div><div>url = window.location.href; /* 获取完整URL */</div><div>alert(url); /* http://127.0.0.1:8020/Test/index.html#test?name=test */</div><div>&nbsp;</div><div>url = window.location.pathname; /* 获取文件路径（文件地址） */</div>...]]></description><category>javascript外包</category><comments>http://www.35ui.cn/post/20180330700.html#comment</comments><wfw:comment>http://www.35ui.cn/</wfw:comment><wfw:commentRss>http://www.35ui.cn/feed.asp?cmt=2544</wfw:commentRss><trackback:ping>http://www.35ui.cn/cmd.asp?act=tb&amp;id=2544&amp;key=b12dc29d</trackback:ping></item><item><title>javascript教程|js教程</title><author>04xiaoming@163.com (xiaoming)</author><link>http://www.35ui.cn/post/20180310289.html</link><pubDate>Sat, 10 Mar 2018 10:12:30 +0800</pubDate><guid>http://www.35ui.cn/post/20180310289.html</guid><description><![CDATA[<p><a href="/post/20160119220.html" title="js刷新页面" target="_blank"><span style="font-size: small;">js刷新页面</span></a></p><p><a href="/post/20160204391.html" title="typeof js中typeof的用法" target="_blank"><span style="font-size: small;">typeof</span></a></p><p>...</p>]]></description><category>javascript外包</category><comments>http://www.35ui.cn/post/20180310289.html#comment</comments><wfw:comment>http://www.35ui.cn/</wfw:comment><wfw:commentRss>http://www.35ui.cn/feed.asp?cmt=2541</wfw:commentRss><trackback:ping>http://www.35ui.cn/cmd.asp?act=tb&amp;id=2541&amp;key=53961bc2</trackback:ping></item><item><title>js三元表达式-JavaScript三元运算符的多种使用技巧</title><author>04xiaoming@163.com (xiaoming)</author><link>http://www.35ui.cn/post/20180203291.html</link><pubDate>Sat, 03 Feb 2018 22:23:12 +0800</pubDate><guid>http://www.35ui.cn/post/20180203291.html</guid><description><![CDATA[<p>&nbsp;js 三元表达式</p><div><strong>JavaScript三元运算符的多种使用技巧</strong></div><div>发现代码慢慢写多了的时候会不自觉的将if else 用 三元来替代，仅仅是未了让代码更简洁精辟，当然也有人说用三元可以让你有高潮的感觉。最近在写js 的时候也有这样的感觉，并且收集了一些小技巧，分享分享。</div><div>&nbsp;</div><div>====普及线====</div><div>&nbsp;</div><div>表达式 (expr1) ? (expr2) : (expr3)</div>...]]></description><category>javascript外包</category><comments>http://www.35ui.cn/post/20180203291.html#comment</comments><wfw:comment>http://www.35ui.cn/</wfw:comment><wfw:commentRss>http://www.35ui.cn/feed.asp?cmt=2537</wfw:commentRss><trackback:ping>http://www.35ui.cn/cmd.asp?act=tb&amp;id=2537&amp;key=c4d94cf5</trackback:ping></item><item><title>js replace全部替换</title><author>04xiaoming@163.com (xiaoming)</author><link>http://www.35ui.cn/post/20170813950.html</link><pubDate>Sun, 13 Aug 2017 07:15:39 +0800</pubDate><guid>http://www.35ui.cn/post/20170813950.html</guid><description><![CDATA[<p>&nbsp;正常，没有变量的时候应该是这样：</p><div>把 a 替换成 b：</div><div>string.replace(&quot;a&quot;,&quot;b&quot;);</div><div>以上只能替换第一个匹配的，要全文匹配应该用正则表达式：</div><div>string.replace(/a/g,&quot;b&quot;);</div><div>正则加个参数 g ，表示全文匹配。</div><div>&nbsp;</div><div>但现在，我要替换的不是 a 这个字符了，而是从外面传进来的一个变量：</div><p>...</p>]]></description><category>javascript外包</category><comments>http://www.35ui.cn/post/20170813950.html#comment</comments><wfw:comment>http://www.35ui.cn/</wfw:comment><wfw:commentRss>http://www.35ui.cn/feed.asp?cmt=2518</wfw:commentRss><trackback:ping>http://www.35ui.cn/cmd.asp?act=tb&amp;id=2518&amp;key=d9f396d6</trackback:ping></item><item><title>js日期时间函数 jJS 时间相减得出天数</title><author>04xiaoming@163.com (xiaoming)</author><link>http://www.35ui.cn/post/20170512403.html</link><pubDate>Fri, 12 May 2017 10:39:26 +0800</pubDate><guid>http://www.35ui.cn/post/20170512403.html</guid><description><![CDATA[<p>&nbsp;var date1 = new Date('2013/04/02 18:00')</p><div>var date2 = new Date('2020/04/02 19:22:21')</div><div>&nbsp;</div><div>var s1 = date1.getTime(),s2 = date2.getTime();</div><div>var total = (s2 - s1)/1000;</div><div>&nbsp;</div><div>&nbsp;</div>...]]></description><category>javascript外包</category><comments>http://www.35ui.cn/post/20170512403.html#comment</comments><wfw:comment>http://www.35ui.cn/</wfw:comment><wfw:commentRss>http://www.35ui.cn/feed.asp?cmt=2512</wfw:commentRss><trackback:ping>http://www.35ui.cn/cmd.asp?act=tb&amp;id=2512&amp;key=88e41b14</trackback:ping></item><item><title>window.location.href 如何用js得到当前页面的url信息方法(JS获取当前页面的URL)</title><author>04xiaoming@163.com (xiaoming)</author><link>http://www.35ui.cn/post/20170417768.html</link><pubDate>Mon, 17 Apr 2017 14:37:16 +0800</pubDate><guid>http://www.35ui.cn/post/20170417768.html</guid><description><![CDATA[<p>&nbsp;如何用js得到当前页面的url信息方法(JS获取当前页面的URL)&nbsp;1，设置或获取对象指定的文件名或路径。&nbsp;alert(window.location.pathname)&nbsp;2，设置或获取整个 URL 为字符串。&nbsp;alert(window.location.href);&nbsp;3，设置或获取与 URL 关联的端口号码。&nbsp;alert(w</p>]]></description><category>javascript外包</category><comments>http://www.35ui.cn/post/20170417768.html#comment</comments><wfw:comment>http://www.35ui.cn/</wfw:comment><wfw:commentRss>http://www.35ui.cn/feed.asp?cmt=2510</wfw:commentRss><trackback:ping>http://www.35ui.cn/cmd.asp?act=tb&amp;id=2510&amp;key=26f89907</trackback:ping></item></channel></rss>
