var infoWindow = window.open('testopenwindow.html')
infoWindow.onload = function() {
infoWindow.document.getElementById("test").innerHTML = '2';
infoWindow.document.getElementById("wxQrcode").src = "data:image/jpg;base64," + data;
infoWindow.document.getElementById("wxQrcode").style.display = "block";
infoWindow.document.getElementById("tertcc").value="这里是你要赋的值ccccccc"; //表单提交
//infoWindow.document.getElementById('sub_form').submit(); //触发按钮
// infoWindow.document.getElementById("btn").onclick();
}
本文介绍了一种通过 JavaScript 操作新打开窗口的方法,并演示了如何设置页面元素的内容及属性,包括修改文本、图片源及表单值等。

986

被折叠的 条评论
为什么被折叠?



