1.我这边为vue的页面,直接在static里面将页面放进去,通过url进行传值
<iframe id=”theirs2″ :src=”‘static/rtc2.html?’+item.ip” scrolling=”no” frameborder=”0″>
</iframe>
2.在嵌套的js文件里面直接location.search就可以拿到通过url拿过来的值,在发送的url处写个?进行判断到底传过来的是什么值
var paras = location.search.split(“?”)
console.log(paras[1]);
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/234790.html原文链接:https://javaforall.net