Javascript 第二天下载csv文件的HTML代码
嗨,我正在尝试使用html编码从网页下载文件。 网络链接= 如果我今天用下面的代码下载它,它工作正常Javascript 第二天下载csv文件的HTML代码,javascript,html,csv,Javascript,Html,Csv,嗨,我正在尝试使用html编码从网页下载文件。 网络链接= 如果我今天用下面的代码下载它,它工作正常 <html> <head> <title>view injection schedule</title> </head> <body onload=form1.submit()> <form name="form1" method="post" action="http://www.nrldc.org/wbs
<html>
<head>
<title>view injection schedule</title>
</head>
<body onload=form1.submit()>
<form name="form1" method="post" action="http://www.nrldc.org/wbs/injsch.aspx" id="form1">
<div>
<input type="hidden" name ="__EVENTTARGET" id="__EVENTTARGET" value="download" />
<input type="hidden" name ="__EVENTARGUMENT" id="__EVENTARGUMENT" value="filename.csv" />
</div>
<script type="text/javascript">
//<![cdata[
var theform = document.forms['form1'];
if (!theform) {
theform=document.form1;
}
function __dopostback(eventtarget,eventargument) {
if (!theform.onsubmit ||(theform.onsubmit() !=false)) {
theform.__eventtarget.value=eventtarget;
theform.__eventargument.value=eventargument;
theform.submit();
}
}
//]]>
</script>
</html>
查看注入计划
//
现在在日期字段中,我想选择明天的日期,然后下载csv。我做不到。请提供任何帮助/建议。这将对您有所帮助: