当我将表单和输入元素设置为srcdoc(html元素iframe的属性)的值时,它起作用,但是当我使用诸如type =“ submit”之类的输入属性时,它就不起作用
<!DOCTYPE html>
<html>
<body>
<iframe srcdoc="<form> <input type=
"submit"> </form>"
<p>Your browser does not support iframes.</p>
</iframe>
</body>
</html>