该死的IE6总是会对在Firefox下执行很好的Javascript报错,而且没有类似Firebug一样优秀的调试工具.而MS Script Debugger,微软要求通过Windows正版验证后,才能下载, 这太不方便了,以下是直接下载地址。
1、从微软网站下载MS Script Debugger并安装,这是下载地址:
http://download.microsoft.com/download/winscript56/install/1.0a/NT45XP/EN-US/scd10en.exe
2、修改IE的设置:
IE的选项–>高级,有两个选项默认是钩选的:
Disable Script Debugging(Internet Explorer)
Disable Script Debugging(Other)
中文可能是“禁用脚本调试”,去掉这两项的钩选。
3、在需要调试的地方加上debugger;例如: <script language=javascript>
..
debugger;
..
</script>
这就是一个断点,当运行到这里的时候就会中断进入调试模式.
刚刚得到消息,得知V2EX三天前被迫下线了。原因是:
服务器所在的机房接到“上级主管部门”的通知,因为“莫须有”的原因,拔掉了我服务器上的网线。
Livid正在努力恢复那台服务器上受到影响的服务:
中国政府目前的很多做法是在向国民制造恐怖,而我认为对我而言最正确的事情是去制造希望。
对“有关部门”这种简单粗暴的“执法”感到失望和愤怒,我只有这一句话的评论。其他评论请看Zola写的:“不谈政治”是一种政治态度。
从DoNews的i门户了解到i桌面,体验了一下,本来感觉还不错,但他们的公司简介中赫然写着“XX和XX先生于2005年11月带着在加拿大发明的全球首创的网页剪贴技术(该技术现已在美国和中国递交了专利申请)回国创立了爱笛星科技股份有限公司。”,看起来有些别扭。
不知道Netvibes这类的网站算不算侵权,需不需要给他们支付专利费。
Rounded corners
Our rounded corners implementation is based on three different works:
We
took these, combined them, stripped some functionality (kept antialiasing) and simplified the API. There is one
restriction: only DIVs can be rounded with this implementation, which
suited us fine, and made the code a bit shorter.
Usage
You have to attach a class “rounded” to the divs you want round.
Here’s the Javascript that you have to add to the end of your html page:
<script type=“text/javascript”>Rounded(’rounded’, 6, 6);script>
The first parameter, “rounded” stands for the classname
which is used to mark the divs that we want to make round. The other two
parameters are the radius of the corners, the bigger the number, the
rounder you will get.
AJAX能够为Web Application增加良好的User-friendy, 由于今天的search engine robots不能阅读Javascript内容,所以搜索引擎不可收录AJAX的Website, 可以从以下方面做些许改进来建设友好的搜索引擎优化的Website.
一、使用<noscript>标签,要注意在每页的<noscript>标签中书写不同的内容,否则可能被认为是SEO作弊手段中的第三条而被认为是Spam:
<head>
<title>Entry Page to your new Website</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1″/>
<meta name=”Keywords” content=”Keyword for your Website”/>
<meta name=”Description” content=”Excellent convincing sales copy for your website”/>
</head>
<body>
The content of your Websites body begins here. This is where you will call your AJAX information, including the Javascript.
<script type=”text/javascript”>
<!–document.write(”This is just the Beginning!”)//–>
</script>
<noscript>
<p>Begin the information to be covered when the script can not be used. </p>
<p>Your browser does not support JavaScript! This page covers the following information relater to ours product and services. </p>
</noscript>
…
…
</body>
<html>
二、好的AJAX程序应该允许用户在完全禁止Javascript的时候也能够正常工作,为第一个AJAX页面准备一个独特的URL, 使用Google Web Toolkit来开发,Google Web Toolkit考虑了AJAX SEO的问题。
参考资料:
Implementing AJAX? SEO and Accessibility Considerations
SEO Considerations for AJAX Development
还是中文的问题,在?传递中文参数时请使用encodeURIComponent.
document.write(encodeURIComponent(”中文”)); => %E4%B8%AD%E6%96%87
document.write(escape(”中文”)); => %u4E2D%u6587
Rails 能自动 decode 使用encodeURIComponent的编码,但不能对javascript escape的中文进行unescape.CGI.escape和CGI.unescape方法编码是以GBK方式编码中文的,而javascript的escape和unescape是utf-8方式。