我知道document.URL不能设置,虽然location.href可以.
但该文件表明:
URL是DOM Level 0
location.href属性的替代.
那我们document.URL什么时候用?
我忽略*.sqlite3了项目目录和全局gitignore配置中的文件,但之后每次都在git修改日志中显示sqlite3文件.我该如何解决这个问题?
var UserView = Backbone.View.extend({
initialize: function(){
MData.blankHeader.data.topBar.title = '<h1 id="titleLogo">' + this.options.userName + '</h1>';
MData.blankHeader.data.topBar.btn1 = '';
MData.blankHeader.data.topBar.btn2 = '<a href="#" id="sendDm" class="cu-round-btn">???</a>';
$('header').html(Mustache.to_html($('#headerTpl').html(), MData.blankHeader)).append('<div class="topbar-shadow"></div>');
$('footer').html(Mustache.to_html($('#footerTpl').html(), MData.eventlistFooter)).attr('id','').find('.selected').removeClass('selected').end().find('.footer-item:eq(3)').addClass('selected');
$('#content').css({"top": $('header').height() + 'px'});
setTimeout(function(){
scrollinit();
},0);
onScrollEnd = true;//??
this.render();
},
events:{
"click #sendDm" : "sendDm"
},
el: $('body'),
sendDm: function(e){
alert('send dm');
e.preventDefault();
},
render: function(){
var html = "";
html += Mustache.to_html($("#userTpl").html(), this.options.userData);
$('#pullDown').css("display","none");
$('#ajaxEvent').html(html);
console.log(this.options.userId);
if(this.options.userName != "me"){
$('#dm').remove();
}
calTime();
function calTime(){
_.each($('.user-timeStamp'), function(date){
$(date).html(humaneDate(date.innerHTML));
});
} …Run Code Online (Sandbox Code Playgroud)