I have wrote a javascript function containing student id, student name and details. What I want to do is to open a pop up window when a link from a student in a students' list is clicked. I want the pop up window will be in another page. I just want to pass student id, name to that page.
我写了一个包含学生ID,学生姓名和详细信息的javascript函数。我想要做的是当点击学生列表中学生的链接时打开一个弹出窗口。我希望弹出窗口将在另一页面中。我只想将学生ID,姓名传递给该页面。
function opentestimonial(st_Id,stName,details){
window.localStorage.setItem("st_Id", JSON.stringify(st_Id));
document.getElementById("openmodal").innerHTML= localStorage.getItem("st_Id");
window.open("testimonial1.html","socialPopupWindow","location=no, width=500, height=600");
}
Function call
Testimonials
1 个解决方案
#1
0
just pass id in query string, and on document load you can call your popup and use id from url ( querystring )
只需在查询字符串中传递id,在文档加载时,您可以调用弹出窗口并使用url中的id(查询字符串)
#1
0
just pass id in query string, and on document load you can call your popup and use id from url ( querystring )
只需在查询字符串中传递id,在文档加载时,您可以调用弹出窗口并使用url中的id(查询字符串)