I need to use template variable in javascript, but I can not search the example.
For example:
Thanks!
For example:
Code:
<div>
<xen:set var="$myServerTime">{$serverTime}</xen:set>
<script type="text/javascript">
<!--
var currentTime = new Date($myServerTime)
var month = currentTime.getMonth()
var day = currentTime.getDate()
var year = currentTime.getFullYear()
document.write(day + "/" + month + "/" + year)
//-->
</script>
</div>
Thanks!