最近遇到需求,需要在父页面嵌入其他页面,又需要获取父页面中的字段值作为参数调用子页面的JS方法,从而改变子页面中的内容(脑壳痛!!!没办法,客户是上帝!!!)
简单记录下操作方法,方便后续使用:
父页面:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>父页面</title>
<script&