我有两个HTML文件: Report.html和Investigation.html
Report.html有这个按钮
<div>
<input id="InvestigateALF" type="submit" value="Investigate" onclick = "InvestigateALF()">
</div>单击此按钮后,我将调用一个javascript函数,该函数将从后端检索一些JSON格式的数据。我想在Investigation.html页面中的drop上填充此数据
Investigation.html
<select id="Problem" class="browser-default custom-select">
<option value="">-- Select --</option>
</select>如何将响应从javascript发送到该Investigation.html页面?
发布于 2020-04-20 22:41:19
您可以通过localStorage.setItem('objectName', objectValue);将响应放入localStorage。然后,您可以重定向到Investigation.html页面并使用localStorage.getItem('objectName');获取您要查找的值。
https://stackoverflow.com/questions/61325117
复制相似问题