首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏前端开发

    禁止右键菜单代码、禁止复制粘贴代码

    ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return

    2.3K41发布于 2018-06-08
  • 来自专栏七云博客

    禁止右键菜单代码、禁止复制粘贴代码

    ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return

    2.3K10编辑于 2022-01-21
  • 来自专栏技术社区

    js禁止右键菜单代码、禁止复制粘贴代码

    ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == " ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == " ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) { return

    8.5K20编辑于 2022-06-16
  • 来自专栏Java架构师必看

    golang struct转化成map

    := t.Field(i).Tag.Get(tagName) fmt.Println(tagName) if tagName ! = "" && tagName ! = "-" { data[tagName] = v.Field(i).Interface() } } return data } func TestS(t *testing.T) { := t.Field(i).Tag.Get(tagName) fmt.Println(tagName) if tagName ! = "" && tagName !

    84610发布于 2021-05-14
  • 来自专栏程序猿的栖息地

    JavaScript 控制鼠标右键功能含:屏蔽右键菜单、屏蔽粘贴、屏蔽复制、屏蔽剪切、屏蔽选中

    ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){ return

    4.2K10编辑于 2022-04-29
  • 来自专栏橙子探索测试

    mitmproxy抓包 | Python疑难测试场景mock实战(四)

    , "tagId": 295, "tagName": "今天只晒鞋", "thumb": "https:/ , "tagId": 267, "tagName": "体育精彩视频分享", "thumb": "https , "tagId": 247, "tagName": "街舞视频分享", "thumb": "https: , "tagId": 310, "tagName": "就是爱自拍", "thumb": "https:/ , "tagId": 16, "tagName": "就想晒个车", "thumb": "https://

    1.3K30编辑于 2021-12-18
  • 来自专栏windliang的博客

    Vue2剥丝抽茧-模版编译之分词

    ) => { console.log("开始标签:", tagName); }, end: (tagName) => { console.log("结束标签 => { console.log("开始标签:", tagName, unary, start, end); }, end: (tagName, start, end) function parseEndTag(tagName, start, end) { options.end(tagName, start, end); } textEnd 等于 0 - 文本标签 (tagName, start, end) { options.end(tagName, start, end); } } 进行一下测试: const template = " => { console.log("开始标签:", tagName, unary, start, end); }, end: (tagName, start, end)

    58830编辑于 2022-08-20
  • 来自专栏九霄道长

    js禁止鼠标右键及F12禁止查看源代码等

    ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) { ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) { ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) { ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) { ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) {

    5.8K30发布于 2021-03-02
  • 来自专栏总栏目

    网页的一些禁止操作代码

    ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) {                  ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) {                  ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) {                  ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) {                  ((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")) {                 

    85420编辑于 2022-09-05
  • 来自专栏HUC思梦的java专栏

    SAX解析XML

    list; //构建Student对象 private Student student; //用来存放每次遍历后的元素名称(节点名称) private String tagName ; } public void setTagName(String tagName) { this.tagName = tagName; } //只调用一次 =null){ String date=new String(ch,start,length); if(this.tagName.equals("name ")){ this.student.setName(date); } else if(this.tagName.equals ("sex")){ this.student.setSex(date); } else if(this.tagName.equals

    2.8K40发布于 2020-09-03
  • 来自专栏python3

    Python学习:获取标签属性

    xml.dom.minidom.parse('E:\\Selenium_Relatived\\learning\\info.xml') root =dom.documentElement print(root.nodeName) tagname  = root.getElementsByTagName('browser') print(tagname[0].tagName) tagname1 = root.getElementsByTagName ('login') print(tagname1[1].tagName) tagname2 = root.getElementsByTagName('province') print(tagname2 [2].tagName) getElementsByTagName通过标签名获取标签,它所获得的对象是以数组形式存放 2.文件read_xml_2.py:获取标签的属性 #coding=utf-8 import

    2.7K10发布于 2020-01-09
  • 来自专栏北京宏哥

    《手把手教你》系列技巧篇(十一)-java+ selenium自动化测试-元素定位大法之By tag name(详细教程)

    对于Selenium中的tagName定位器,我们将仅使用标签名称来标识元素。 何时在Selenium中使用此tagName定位符? 好吧,在没有属性值(如ID,类或名称)并且倾向于定位元素的情况下,您可能不得不依靠在Selenium中使用tagName定位器。 因此,如果要定位单个元素,请不要在Selenium中使用tagName定位器。 2.运行代码后电脑端的浏览器的动作,如下小视频所示: 4.小结 好了,今天到这里通过name定位就介绍完了,其实很简单,在使用tagname进行定位的时候,由于一个页面中含有的tagname数目不定, ("div")); System.out.println("Button:" + buttons.size()); 注意: 如果使用tagName, 要注意很多HTML元素的tagName是相同的,

    2.7K50发布于 2021-08-05
  • 来自专栏技术博文

    js获取div编辑框,textarea,input text的光标位置,兼容FF和IE

    document.selection) { //非IE浏览器 var thisTagName = null; if ($(element).attr("tagName") ! = "TEXTAREA" && $(element).attr("tagName") ! = "INPUT") { if ($(element).attr("tagName") == "DIV" && $(element).attr("contenteditable") == "true") { thisTagName = window.getSelection().anchorNode.parentElement.tagName; } else { thisTagName == null = null) { if (thisTagName == element.tagName) { if (window.getSelection().anchorNode.textContent ==

    9.1K60发布于 2018-04-10
  • 来自专栏james大数据架构

    表格可在线编辑效果

    == "TR") { return e; } else if (e.tagName == "BODY") { return null; } else { return findRow function findCell(e) { if (e.tagName == "TD") { return e; } else if (e.tagName == "BODY") { return { var r, p, c, nc, text; if (lastSelection == null) return false; r = lastSelection; if (r.tagName moveUp() { var r, p, ls; if (lastSelection == null) return false; r = lastSelection; if (r.tagName == "TD") return "Cell"; if (lastSelection.tagName == "TR") return "Row"; }//欢迎来到站长特效网,我们的网址是

    4.4K50发布于 2018-01-22
  • 来自专栏windliang的博客

    Vue2剥丝抽茧-模版编译之生成AST

    parseHTML(template, { start: (tagName, unary, start, end) => { console.log("开始标签:", tagName , unary, start, end); }, end: (tagName, start, end) => { console.log("结束标签:", tagName , unary, start, end) => { let element = createASTElement(tagName, currentParent); if (! = match.tagName; const unarySlash = match.unarySlash; const unary = !! (tagName, start, end) { options.end(tagName, start, end); } } const template = "

    <span

    54220编辑于 2022-12-21
  • 来自专栏挖坑填坑

    浏览器兼容性问题

    ev.currentTarget; //按下Backspace键 if (ev.keyCode == 8) { var tagName = obj.nodeName //标签名称 //如果标签不是input或者textarea则阻止Backspace if (tagName = 'INPUT' && tagName ! = obj.type.toUpperCase();//标签类型 //input标签除了下面几种类型,全部阻止Backspace if (tagName (ev); } //input或者textarea输入框如果不可编辑则阻止Backspace if ((tagName

    1.1K20发布于 2018-08-21
  • 来自专栏跟着阿笨一起玩NET

    提取HTML的正文类

    inTag; //标记现在的指针是不是在尖括号内 private bool needContent = true; //是否要提取正文 private string tagName value) return; bool ok = true; tagName = ""; = ">") { tagName += word; } else if (word == " " && tagName.Length result.Append (htmlcode[i].ToString ()); } } else if (tagName.StartsWith else { foreach (string str in specialTag) { if (tagName

    1.8K10发布于 2018-09-18
  • 来自专栏拭心的安卓进阶之路

    XML序列化以及用pull解析器解析XML文件

    = XmlPullParser.END_DOCUMENT){ String tagName = parser.getName(); //获得当前节点名称 switch(eventType){ case XmlPullParser.START_TAG: //等于开始节点 、 if("persons".equals(tagName)){ // personList = new ArrayList (); }else if("person".equals(tagName)){ id = parser.getAttributeValue(null,"id"); person.setId(Integer.valueOf(id)); }else if("name".equals(tagName )){ person.setName(parser.nextText()); }else if("age".equals(tagName)){

    96420编辑于 2022-11-30
  • 来自专栏前端小歌谣

    ES6模块化开发计算器小案例续

    ev) { const e = ev || window.event, tar = e.target || e.srcElement, tagName = tar.tagName.toLowerCase(); console.log(tagName) if (tagName === 'button') { = tar.tagName.toLowerCase(); console.log(tagName) if (tagName === 'button') { = tar.tagName.toLowerCase(); console.log(tagName) if (tagName === 'button') { = tar.tagName.toLowerCase(); console.log(tagName) if (tagName === 'button') {

    30210编辑于 2023-11-16
  • 来自专栏移动开发面面观

    iOS中HTML的解析——Hpple

    :%@",[element tagName]); NSLog(@"attributes:%@",[element attributes]); 我们搜索文本中的

    获得如下输出: 2018 HppleDemo[8877:1175700] content:Hello world 2018-03-03 19:29:01.249579+0800 HppleDemo[8877:1175700] tagName element{ NSLog(@"raw:%@",[element raw]); NSLog(@"content:%@" , [element content]); NSLog(@"tagName :%@",[element tagName]); NSLog(@"attributes:%@",[element attributes]); } 这样修改之后,我们可以看到

    的子标签也被一一打印了出来 HppleDemo[9647:1226741] content:Hello world 2018-03-03 20:32:27.724982+0800 HppleDemo[9647:1226741] tagName

    2.5K20发布于 2018-07-03
领券