Wie gewaltsam download .csv-Datei, anstatt öffnen Sie den browser in html

Wenn ich auf den download button drücken, link zur neuen Webseite Dank und nach 2 Sek download starten .csv-Datei von der SD-Karte.

Statt dem herunterladen der Datei, wird es immer angezeigt, die auf browser -. Unten ist mein code.

Wie bekomme ich die download-option, jedes mal? Bitte kein php-code, wie ich bin neu in html.

Ich nicht wollen, speichern Sie mit save as option nach .csv-Datei-browser öffnen.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
        <head>
            <title>Monitoring System</title>
            <link href="/mchp.css" rel="stylesheet" type="text/css" />
            <script src="/mchp.js" type="text/javascript"></script>
        </head>

        <body>
            <div id="shadow-one">
                <div id="shadow-two">
                    <div id="shadow-three">
                        <div id="shadow-four">
                            <div id="page">
                                <div>
                                    <div>
                                        <div>
                                            <div id="title">    
                                                <div class="right">Interface</div>
                                                <div class="left">Overview</div>
                                            </div>

                                            <div id="content">
                                                <h1>Monitoring System</h1>

                                                <table style="padding-left: 10px;">
                                                    <div id="lcontent">
                                                    <div id="llogindiv" ><h1>Thanks for downloading...</h1></div>
                                                    <META HTTP-EQUIV="refresh" CONTENT="2;~GetEventFile~;";>
                                                </table>

                                            </div>
                                        </div>
                                        <div class="spacer">&nbsp;</div>
                                        <div id="footer">Copyright &copy; Monitoring System</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </body>
    </html>

~GetEventFile~ geben Sie mir die Datei-Namen zur Laufzeit.

InformationsquelleAutor Hari | 2016-01-29
Schreibe einen Kommentar