jQuery 可以在 CD 分发的“网站”上运行吗?
遗憾的是我必须制作一个可以放在 CD 上的网站(可以这么说)。 我的问题是,我可以使用 JavaScript 和 jQuery 吗?
一些获得 CD 的人可能在 Win XP 上安装了 IE6。
谢谢。
Sadly I have to make a website (so to speak website) that can be placed on a CD.
My question is, can I use JavaScript and jQuery?
Some of the people who get the CD might have IE6 on Win XP installed.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的。 jQuery 明确支持 IE6,而 IE6 支持 JavaScript(这是必须的,否则 jQuery 无法支持),尽管它有一些 bug。
Yes. jQuery explicitly supports IE6, and IE6 supports JavaScript (it would have to, otherwise jQuery couldn't support it) although it has some bugs.
您可以将网站刻录到 CD 上,并且 javascript/jquery 应该可以正常工作。但请注意,您只能拥有静态资源:即每个请求都必须针对 CD 上存在的物理资产。也就是说,您将无法动态呈现页面以响应请求,并且我很确定您也将无法发出 ajax 请求。
You can put a website on to CD, and javascript/jquery should work fine. But beware that you'll only be able to have static resources: that is every request must be for a physical asset that exists on the CD. I.e you wont be able to have pages rendered dynamically in response to a request, and I'm pretty sure that you won't be able to make ajax requests too.
我有制作这样的东西的经验。这是一份商品目录。所以我抓取所有数据并将其转换为 JSON。目录本身只有一页,使用 JS 和客户端模板展示商品,进行一些排序和搜索。使用此目录的最大问题是从 CD 读取大量小文件非常慢。因此,有必要使用尽可能多的 CSS 精灵来代替常规的好照片集。
I had experience of making such a thing. It was a catalog of goods. So I grab all data and converted it to JSON. The catalog itself was only one page which show the goods using JS and client-side templating, doing some sorting and search. The biggest problem with using this catalog was that fact that reading much of small files from CD is really slow. So it was necessary to use as much CSS-sprites as possible instead of regular set of good's photos.