Javascript 将文本文件的内容显示为组合框选项

Javascript 将文本文件的内容显示为组合框选项,javascript,html,Javascript,Html,我试图读取一个.txt文件的内容,循环浏览这些行,并使用combobox将它们显示为multiselect/options。我在html、css和js方面没有任何知识。请帮忙 这是我在谷歌搜索后建立的。但我不需要工字架。我需要多选选项 <html> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <head> <title>Trigger</t

我试图读取一个.txt文件的内容,循环浏览这些行,并使用combobox将它们显示为multiselect/options。我在html、css和js方面没有任何知识。请帮忙

这是我在谷歌搜索后建立的。但我不需要工字架。我需要多选选项

<html>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
   <title>Trigger</title>
      <style> 

        #target { 
            width: 300px; 
            height: 200px; 
            overflow-y: auto; 
            overflow-x: auto; 
            resize: both; 
            position: relative; 
            z-index: 2; 
        } 

        iframe { 
            width: 100%; 
            height: 100%; 
            border: auto; 
        } 
    </style> 
</head>

<body>

<h1 style="background-color:MediumSeaGreen; border:2px solid Black; font-family:verdana;">Trigger Page</h1>
<p style="font-family:verdana;" >Please select from the below list:</p>

<iframe id='iframe' src = 'D:/allStories.txt' onload='readfile()'> </iframe>

</body>
</html>

我正在等待multiselect list

您想用JS在服务器上读取文本文件吗?我想在本地机器上读取文本文件,并在localhost:8080/页上以上述格式显示内容。Html