【发布时间】:2018-02-21 13:58:30
【问题描述】:
我的.cshtml 页面中有一个指向 SSRS 报告的链接:
<div class="col-md-8">
<a href="http://xxx.xx.xx.x/ReportServer/Pages/ReportViewer.aspx?%2fCompany_Reporting%2fpayr0001&rs:Command=Render&StartDate=01/09/2017" target="_blank" >Timesheet Status Report</a>
</div>
我需要将日期控件中的值作为参数传递,而不是上面的硬编码日期:
<div class="form-group">
<input type="date" class="form-control" id="datefrom">
</div>
我已尝试将 onclick=myfunction() 附加到 url 以添加日期值,但无法正常工作。
function getStartDate() {
return document.getElementById("datefrom").value;
}
任何帮助将不胜感激。
干杯。
【问题讨论】:
-
你能显示你尝试添加的onclick功能吗?
-
这是什么
myfunction()?仅仅发布 html 不会让我们知道实际发生了什么 -
标签: javascript c# html