【发布时间】:2012-12-28 05:08:35
【问题描述】:
我的 html 页面如下所示。我需要做的是,如果有人在 IFRAME 之外的申请者信息 1$FirstName 字段中键入内容 - 我对在 Iframe 中打开的 url 没有任何控制权。这可能使用 Json 或 Javascript 吗?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
First Name :
<input name="ApplicantInfo1$FirstName" type="text" maxlength="30" id="ApplicantInfo1_FirstName" title="First Name" class="nonnumeric" minlength="2" style="width:200px;" />
<br />
<iframe id="progressive" src="https://www.progressivelp.com/onlineapplication/onlineapplication.aspx?sid=Metro2674957490&kid=1" width="940" height="1200" scrolling="no" style="border:none;"></iframe>
</body>
</html>
【问题讨论】:
-
@IvoJonkers:似乎这个答案只设置了 iframe 的 URL,这不会触发同源策略。
标签: javascript json iframe