UNPKG
liu
Version:
latest (1.0.0)
1.0.0
liu
liu
/
main.js
9 lines
(6 loc)
•
240 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
var
newTemp =
document
.
getElementById
(
'new-temp'
);
var
tmpl =
'<p>the value is : <%= val %></p>'
;
setInterval
(
function
(
){
var
val =
document
.
getElementById
(
'new-temp-val'
).
value
; newTemp.
innerHTML
= ejs.
render
(tmpl,{
val
:val}); },
2000
);