<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <button> 跨域传输 </button> <script> var but=document.querySelector('button'); but.onclick=function(){ var iframe=document.createElement('iframe'); iframe.src='page.html';//加载页面 iframe.style.display='none'; document.body.appendChild(iframe); } window.onload=function(eve){ var iframeWindowName=eve.target.contentWindow.name; eval(iframeWindowName); console.log(num); } </script> </body> </html>
老师,为啥报错的 contentWindow.name和eval()是啥意思
老师 我这咋回事 我往里面加了东西 加了 然后再读 就不行
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>自定义左键菜单案例</title> <style type="text/css"> *{ padding: 0; margin: 0; } ul{ list-style: none; background: #9f9f9f; min-width: 250px; display: inline-block; position: absolute; display: none; } ul li{ height: 30px; line-height: 30px; padding: 5px 20px; cursor: pointer; transition: 0.3s; } ul li:hover{ background: #b3d4fc; color: #ffffff; } </style> </head> <body> <ul> <li>一</li> <li>二</li> <li>三</li> <li>四</li> <li>去百度搜索页面中选中的内容</li> </ul> <textarea cols="80" rows="30"></textarea> <script> var ul =document.querySelector("ul"); //禁用右键菜单 document.oncontextmenu=function (eve) { return false; }; document.onmouseup=function (eve) { //判断鼠标用的哪个按钮 // 0 左键 1 滑轮 2 右键 if(eve.button==2){ ul.style.display="inline-block"; //设置鼠标点击的位置 ul.style.left=eve.clientX+"px"; ul.style.right=eve.clientY+"px"; }else{ //关闭菜单 ul.style.display="none"; } } //点击某个惨淡选项时触发的事件(事件委托 ul.onmousedown=function (eve) { if(eve.target.innerHTML=="一"){ alert("去吧"); }else if(eve.target.innerHTML=="二"){ if(confirm("二")){ window.close(); } }else if(eve.target.innerHTML=='去百度搜索页面中选中的内容'){ var resukt=document.getSelection().toString(); window.open('http://www.baidu.com/s?wd='+resukt); }else{ var result= prompt('输入内容然后去百度搜索'); window.open('http://www.baidu.com/s?wd='+result); } } </script> </body> </html>
这种应该没有错吧,感觉和视频里有点不一样
老师,我按着之前的方法创建一个虚拟机,发现ping不通网络(一模一样的步骤)
mybatiscase.zip
老师,我在TestUserMapper4中的testCache3()中测试二级缓存,但是一级缓存关闭后,还是会有sql语句喃,跟老师的测试结果不一样
我就想知道这个老师在说什么,听了几节课了完全听不懂,难道这些代码就靠硬记吗?
老师,讲的时候和敲代码的时候能不能不要那么快,看的一脸懵
这个为什么不会端口抢占
老师,今天编写代码的时候发现我之前不小心把
new PaintThread().start();
写成
new PaintThread().run();
导致后面
this.addKeyListener(new KeyMonitor());
这个代码不生效,按键监听不了,这是为什么?
equals方法在没有重写的情况是默认比较两个对象的哈希值,但视频中的g1和g3很明显地址是不一样的,为什么会返回true?
我之前安装nginx没有安装这个模块,现在按照这个:https://blog.csdn.net/wangjia55/article/details/91961569操作,老提示:bash: ./configure: 没有那个文件或目录。怎么解决啊?
老师,这里爬到一些数据像是转码过了,有什么办法解码吗
老师能帮我看看什么原因嘛!和视频中的没有区别哇,怎么就显示无法加载'org.wltea.analyzer.lucene.IkTokenizerFactory'
// package com.ruoyi.project.cms.type.service; @Override public String checkTypeNameUnique(CMSType type) { // 当前可能是在修改公告类型,也可能在新增公告类型。 如果是修改,则需要判定主键。 Long typeId = StringUtils.isNull(type.getTypeId()) ? -1L : type.getTypeId(); CMSType info = typeAddMapper.checkTypeNameUnique(type.getTypeName()); if (StringUtils.isNotNull(info) && info.getTypeId().longValue() != typeId.longValue()) { return CMSTypeConst.TYPE_NAME_NOT_UNIQUE; } return CMSTypeConst.TYPE_NAME_UNIQUE; } /////////////////////////////////////////////////////// // 老师,我的疑问是: // 这个方法需要的参数是CMSType类型的, // 我不懂的是前端(下面的add.html中)是怎么传入CMSType类型的参数给后端的 // 还是说前端传入的参数类型不是CMSType的? ///////////////////////////////////////////////////////
老师请问这个用print为什么没有不显示结果?麻烦老师解答一下
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637