我需要访问表单元素属性“ action”。
代码:
<iframe id="my_iframe" class="msg signin" scrolling="no" width="600" height="550" src="https://xxx">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>fgtyhnj</title>
</head>
<body>
<form action="https://cfvghg" method="POST">
<input type="hidden" name="client_id" value="BLOOD_ALEXA">
<input type="hidden" name="redirect_uri" value="https://dxfc">
</form>
</body>
</html>
</iframe>
我已经使用了以下行。 jQuery:
$(#my_iframe).find("form").attr("action")