网络浏览器: Difference between revisions
m help translation |
|||
Line 58: | Line 58: | ||
=== User Agent === | === User Agent === | ||
探测Nintendo 3DS浏览器的User Agent的代码: | |||
<script type="text/javascript"> | <script type="text/javascript"> | ||
if (navigator.userAgent.indexOf('Nintendo 3DS') == -1) { // | if (navigator.userAgent.indexOf('Nintendo 3DS') == -1) { //如果UserAgent不是"Nintendo 3DS" | ||
location.replace('http://www.3dbrew.org'); // | location.replace('http://www.3dbrew.org'); //跳转到另一个页面 | ||
} | } | ||
</script> | </script> | ||
* | * 你也可以用 <em>navigator.platform=="Nintendo 3DS"</em> 来判断。 | ||
=== Scrolling === | === Scrolling === |