javascript - 打开 Modal 并将 URL 发送到 iFrame
问题描述
我需要将包含一些字符串数据的 URL 发送到名为“galiframe”的 iframe。这是一个基本的图片库,因此,在模态框的链接中,我需要发送图片名称、物理地址和其他一些项目来识别用户 ID、请求 #、麦克风......但是,打开 Modal 的 jQuery 链接不允许我这样做。有什么建议吗?PS 我正在使用经典的 .asp 和 jQuery css...尽量不要笑得太厉害...我老了,我的代码也老了。
<!-- Remember to include jQuery :) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<!-- jQuery Modal -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css" />
</head>
<body>
<style>
body {font-family: Arial, Helvetica, sans-serif;}
/* The Modal */
.modal {
background-image: url("bgimg.png");
background-repeat: no-repeat;
background-color: #5DADE2;
width: 80%;
-webkit-animation-name: animatetop;
-webkit-animation-duration: 0.4s;
animation-name: animatetop;
animation-duration: 0.4s
border-radius: 10px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
/* Add Animation */
@-webkit-keyframes animatetop {
from {top:-300px; opacity:0}
to {top:0; opacity:1}
}
@keyframes animatetop {
from {top:-300px; opacity:0}
to {top:0; opacity:1}
}
/* iframes Container */
.frameset {
display:inline-block;
width: 100%;
border: 0;
}
</style>
<div id="ex1" class="modal">
Image Gallery
<div class="frameset">
<iframe src="" name="galiframe"></iframe>
<iframe src="listimg.asp" name="listframe"></iframe>
</div>
</div>
<!--- Attach link from img to open the modal --->
<!---Also sending URL to galliframe for img retrieval --->
<a href="#ex1" rel="modal:open">URL, Edit this image</a>
<a href="#ex1" rel="modal:open">URL, Edit a different image</a>
解决方案
推荐阅读
- selenium-webdriver - 如何使用 selenium 在 chrome 中的窗口之间切换
- excel - VBA Excel宏退出所有工作簿以无限循环结束
- android - Android:在给定距离和方位的情况下查找目的地位置
- excel - VBA 使用 .xlsm 工作簿中的单元格值来命名 .xlsx 工作簿
- azure-sdk-python - 未找到 azure-sdk-python 状态代码 GraphRbacManagementClient
- c# - 引导按钮使链接到另一个网页
- amazon-web-services - 字符长度超过 DDL 长度
- mql4 - 如何使用 cmd 执行 MQL4 或 MQL5 的 OrderSend() 函数?
- python - 从距离矩阵实现 k 最近邻?
- git - 如何启动一个新的兄弟分支到一个等待被接受到拥有该分支所有提交的开发分支