JS part:
function click_day_hourly_diagram(res) {
var pid = nothing;
var beginday = document.getElementById("test1").value;
// alert (beginday);
window.location.href='{:url("index/day_hourly_diagram")}?pid='+ pid+"&beginday="+beginday;
}
html part:
<a href="javascript:void(0);" onclick="click_day_hourly_diagram('{$vo.id}')" >hourly curve</a>
Reproduced in: https: //www.jianshu.com/p/fea85a23fdee