1

私は次のコードを持っています...

しかし、エラーを表示しています *キャッチされていない型参照 未定義のメソッド 'split' を呼び出せません *

    <script src="jquery-1.7.2.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var textFile = "nav.txt";
            jQuery.get(textFile, function (textFileData) {
                var EachLineInTextFile = textFileData.responseText.split("\n");
                for (var i = 0, len = EachLineInTextFile.length; i < len; i++) {
                    STORE_TO_REPLACE = EachLineInTextFile[i];
                    //STORE_TO_REPLACE: I would have to the entire format of your file to do this.
                    console.log(STORE_TO_REPLACE);
                }
            })
        });
</script>

nav.txt ファイルは以下のとおりです

a a.aspx
b b.aspx
c c.aspx
4

1 に答える 1