我有一个json文件,它存储菜单项列表,并通过创建forEach循环并使用document.createElement()和appendChild()将其呈现给HTML。现在,当用户单击Add时,我将存储该菜单项的详细信息,并从json文件中找到其价格,并调用helper函数来计算最终价格。另外,我需要在localStorage中存储菜单项图像的详细信息.一些代码://When "Add to Cart" button is clicked, this funct
以这种方式我有2个html和3个js文件。globals.js --> //includes global.js and login.js.Fires event() function on a button click
function event() window.testIndex= 2;
window.location.as