【发布时间】:2014-06-26 09:27:04
【问题描述】:
我目前有以下代码
doctype html
html
head
title Test
link(rel='stylesheet', href='/stylesheets/style.css')
link(rel='stylesheet', href='/stylesheets/bootstrap.min.css')
script(src="/javascripts/jquery.js")
body
script.
var start = Date.now()
console.log(start)
div(id='microtime')
p
script.
$(document).ready(function() {
var end = (Date.now() - start) / 1000
console.log(end)
$('#microtime p').text = 'aa'
})
我试图制作一个微时间来显示页面加载时间,目前代码在控制台上显示 0 个错误,但 #microtime p 文本没有更新,div 微时间没有任何 css 属性,并且 console.log 工作正常。 ..
【问题讨论】:
标签: javascript jquery css node.js