vue 支付宝

							const dv = document.createElement('div');
							self.$refs.pay.contentWindow.document.body.innerHTML = response.data;
							//self.$refs.pay.appendChild(dv);
							//	dv.firstChild.setAttribute('target','_blank');
							console.log(self.$refs.pay);
							self.$refs.pay.contentWindow.document.forms['alipaysubmit'].submit();
							self.$refs.pay.contentWindow.document.forms.alipaysubmit.submit();
				

还有一种方法

						console.log(response.data);
						const dv = document.createElement('div');
						dv.innerHTML = response.data;
						document.body.appendChild(dv);
						//dv.firstChild.setAttribute('target','_blank');
						//console.log(dv)
						document.forms['alipaysubmit'].submit();
						document.forms.alipaysubmit.submit();

你可能感兴趣的:(前端随笔)