我想从网上下载一些公共文件,其中包含一些 javascript 代码,以使用户以交互方式点击下载。所以直接废掉下载链接并不容易。其实这个网站是我点击上一个网站时新弹出的网站。以前的网站有类似的表格,但没有文件,但“按钮”指向该网站,其源内容如下:
代码 :-
<table class="Grid" cellspacing="0" rules="all" border="1" id="ctl00_ContentPlaceHolder1_plc1Content_ucGISExternalSearchResultsView_ucView_ucWIDFolderListView_grdList" style="width:100%;border-collapse:collapse;">
<tr class="GridHeader">
<th scope="col" style="width:2%;white-space:nowrap;">Open</th><th scope="col">Data Type</th><th scope="col">Direction</th><th scope="col">Data Date</th><th scope="col">Create Date</th><th scope="col">File</th><th scope="col">File Name</th><th scope="col" style="white-space:nowrap;">File Size</th>
</tr><tr class="GridItem" onmouseover="this.className='highlightrow'" onmouseout="this.className=''">
<td align="center" style="white-space:nowrap;">
<***input onclick="javascript: if(!PerformConfirm('Are you sure you want to download the file 87K193-Cut_and_Cap.pdf?***')) return false; else return true ;" type="submit" name="ctl00$ContentPlaceHolder1$plc1Content$ucGISExternalSearchResultsView$ucView$ucWIDFolderListView$grdList$ctl03$btnDownload" value="" id="ctl00_ContentPlaceHolder1_plc1Content_ucGISExternalSearchResultsView_ucView_ucWIDFolderListView_grdList_ctl03_btnDownload" title="Download" class="SelectButton" />
</td><td align="center">DRILLING & COMPLETION</td><td align="center"> </td><td align="center">2012-10-03</td><td align="center">2012-10-03</td><td align="center">PDF</td><td align="center">87K193-Cut_and_Cap.pdf</td><td align="center">
<span id="ctl00_ContentPlaceHolder1_plc1Content_ucGISExternalSearchResultsView_ucView_ucWIDFolderListView_grdList_ctl03_lblFileSize">69 KB</span>
</td>
</tr><tr class="GridAlternatingItem" onmouseover="this.className='highlightrow'" onmouseout="this.className=''">
<td align="center" style="white-space:nowrap;">
<input onclick="javascript: if(!PerformConfirm('Are you sure you want to download the file 87k193_ER130_V.PDF?')) return false; else return true ;" type="submit" name="ctl00$ContentPlaceHolder1$plc1Content$ucGISExternalSearchResultsView$ucView$ucWIDFolderListView$grdList$ctl04$btnDownload" value="" id="ctl00_ContentPlaceHolder1_plc1Content_ucGISExternalSearchResultsView_ucView_ucWIDFolderListView_grdList_ctl04_btnDownload" title="Download" class="SelectButton" />
</td><td align="center">DRILLING & COMPLETION</td><td align="center"> </td><td align="center">2012-10-03</td><td align="center">2012-10-03</td><td align="center">PDF</td><td align="center">87k193_ER130_V.PDF</td><td align="center">
<span id="ctl00_ContentPlaceHolder1_plc1Content_ucGISExternalSearchResultsView_ucView_ucWIDFolderListView_grdList_ctl04_lblFileSize">715 KB</span>
</td>
</tr><tr class="GridItem" onmouseover="this.className='highlightrow'" onmouseout="this.className=''">
<td align="center" style="white-space:nowrap;">
<input onclick="javascript: if(!PerformConfirm('Are you sure you want to download the file 87K193_Survey_Plan.pdf?')) return false; else return true ;" type="submit" name="ctl00$ContentPlaceHolder1$plc1Content$ucGISExternalSearchResultsView$ucView$ucWIDFolderListView$grdList$ctl05$btnDownload" value="" id="ctl00_ContentPlaceHolder1_plc1Content_ucGISExternalSearchResultsView_ucView_ucWIDFolderListView_grdList_ctl05_btnDownload" title="Download" class="SelectButton" />
</td><td align="center">SURVEY PLANS & DR SURVEYS</td><td align="center"> </td><td align="center">2011-06-14</td><td align="center">2011-06-14</td><td align="center">PDF</td><td align="center">87K193_Well_Survey_Plan.pdf</td><td align="center">
<span id="ctl00_ContentPlaceHolder1_plc1Content_ucGISExternalSearchResultsView_ucView_ucWIDFolderListView_grdList_ctl05_lblFileSize">33 KB</span>
</td>
</tr><tr class="GridRowCount">
<td class="GridRowCount" colspan="8">3 data records found.</td>
</tr>
</table>