关于程序升级为 HTML5 的问题和建议
关于程序升级为 HTML5 的问题和建议
By ruitang
at 2015-06-06
0人收藏 • 2491人看过
关于程序升级为 HTML5 的问题和建议
看到Carbon-Forum的 Doctype,请问是否有升级为HTML5的计划呢?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
如果直接更改为 <!DOCTYPE html> 可以吗?
- 登录后方可回帖
4 个回复 | 最后更新于 2015-06-06
为什么UEditor代码不会着色?
//Button go to top
$(function(){
//Initialize position of button
$("#go-to-top").css('left',(Math.max(document.body.clientWidth, 960) - 960)/2 + 690);
$("#go-to-top").click(function(){
$("html, body").animate({"scrollTop": 0}, 400);
return false;
});
$(window).scroll(function() {
var top = $(document).scrollTop();
var g = $("#go-to-top");
if (top > 500 && g.is(":hidden")) {
g.fadeIn();
} else if(top < 500 && g.is(":visible")) {
g.fadeOut();
}
});
$(window).resize(function() {
$("#go-to-top").css('left',(Math.max(document.body.clientWidth, 960) - 960)/2 + 690);
});
//Search box
$("#SearchButton").click(function() {
if($("#SearchInput").val()){
location.href = WebsitePath + "/search/" + encodeURIComponent($("#SearchInput").val());
}
});
$("#SearchInput").autocomplete({
serviceUrl: WebsitePath + '/json/tag_autocomplete',
minChars: 2,
type: 'post'
});
})
现在程序里已经有不少地方使用了HTML5。
例如这个草稿箱的LocalStorage。
HTML5主要是一套JavaScript接口,和少量的新标签,跟Doctype的声明并没有半毛钱关系。
回复#2 @lincanbin :你这样说肯定不对吧,Doctype的声明就是告诉浏览器:这个文档使用HTML5规范还是HTML4规范,当然有关系咯...
回复#3 @ruitang :对的,目前使用的是XHTML规范,但是同样是支持LocalStorage之类的所谓"HTML5"特性,实际上这些是浏览器特性。