`

a link 标签的disabled属性实现disabled

    博客分类:
  • HTML
阅读更多
1.由于alink是disabled属性设置成true,只是颜色变灰色但是还能提交.要想不能提交,不许删除href属性.代码如下
     var aLinkArr = document.getElementsByTagName("a"); 
     for(var j = 0; j < aLinkArr.length; j++)
     {	
     	if(!aLinkArr[j].disabled)
     	{
	     	aLinkArr[j].disabled = true;
	     	aLinkArr[j].removeAttribute('href');
     	}
     }
分享到:
评论

相关推荐

    完整批处理 配置自动优化电脑 优化系统服务

    ::Distributed link tracking client-用于局域网更新连接信息,比如在电脑A有个文件,在B做了个连接,如果文件移动了,这个服务将会更新信息。占用4兆内存。 sc stop trkwks sc config trkwks start= disabled ...

    S7A驱动720版本

    - The setup program created a wrong e-doc link in Windows start menu. Now the proper link to S7A.CHM will be installed - From the S7A power tool it wasn't possible to open the online help file. ...

    explorerbar

    Each pane contains either some informative text or a number of task link controls. The latter ones are used to quickly access an explorer functionality e.g. the creation of a new folder. If the user ...

    A JSON parser in C++

    JSON++ is a light-weight JSON parser, writer and reader written in C++. JSON++ can also convert JSON documents into lossless XML documents. Contributors http://github.com/hjiang ...

    浪潮服务器关闭cpu节能模式操作步骤.docx

    7. 选中“QPI Configuration”选项,将“Link L0p Enable”选项设置为Disabled。 8. 将“Link L1 Enable”选项设置为Disabled。 通过以上步骤,服务器管理员可以快速关闭CPU节能模式,提高服务器的运行效率和稳定性...

    D-link交换机配置手册

    DHS-3218~26取消端口隔离 1.通过“超级终端”或“Telnet”进入设置画面 2.进入“Configuration” ...3.进入“Configuration Switch Information and ...5.将“Traffic Segmentation”变成“Disabled”

    JLink_Windows_V648.zip

    CCS plugin: Added a new option which allows configuring a J-Link script file &#40;project dependent&#41;. Commander: "erase" did not use the EraseChip command to erase the entire flash but the ...

    Web程序开发:第2章 HTML概述.ppt

    具有布尔值的属性,如disabled、readonly等,当只写属性而不指定属性值时,表示属性值为true;如果要设置为false,可以不使用该属性。 2.3 HTML文件的命名 HTML文件的命名规则如下: * 文件的扩展名要以.html或....

    通信与网络中的交换机err-disable故障解决方法

    导致交换机接口出现err-disable的几个常见原因: 引用 1. EtherChannel misconfiguration 2....假设Switch A把FEC模式配置为on,这时Switch A是不会发送PAgP包和相连的Switch B去协商FEC的,它假设Switch B已经配

    imooc-ant-ui

    项目思考代码结构样式解决方案组件需求分析和编码测试用例分析和编码代码打包输出和发布代码结构样式解决方案 // CSS in JS // Styled Component const Button = ...A:Q:对于link Button,如何实现disabled效果?A

    网站开发制作40个技巧.txt

    1. oncontextmenu= "window.event.returnValue=false " 将彻底屏蔽鼠标右键 (false)&gt; &lt;td&gt; no &lt;/table&gt; 可用于Table 2. ... &lt;input style= "ime-mode:disabled "&gt; 关闭输入法

    网页JavaScript技巧

    7. &lt;input style=\"ime-mode:disabled\"&gt; 关闭输入法 8. 永远都会带着框架 &lt;script language=\"JavaScript\"&gt;&lt;!-- if (window == top)top.location.href = \"frames.htm\"; //frames.htm为框架网页 // --&gt; ...

    DevExpress VCL 13.1.4(v2013vol1.4) 源码-例子-帮助-part2

    Q522890 - Spreadsheet Report Link - Incorrect row height if the system DPI setting does not match 96 B238381 - The "Control 'Preview' has no parent window" exception occurs when closing the Print ...

    DevExpress VCL 13.1.4(v2013vol1.4) 源码-例子-帮助-part1

    Q522890 - Spreadsheet Report Link - Incorrect row height if the system DPI setting does not match 96 B238381 - The "Control 'Preview' has no parent window" exception occurs when closing the Print ...

    JavaScript实用技巧集锦

    7. &lt;input style="ime-mode:disabled"&gt; 关闭输入法 8. 永远都会带着框架 &lt;script language="JavaScript"&gt;&lt;!-- if (window == top)top.location.href = "frames.htm"; //frames.htm为框架网页 // --&gt;&lt;/script&gt;

    40种在asp中使用技巧技巧

    7. &lt;input style="ime-mode:disabled"&gt; 关闭输入法 8. 永远都会带着框架 &lt;script language="JavaScript"&gt;&lt;!-- if (window == top)top.location.href = "frames.htm"; //frames.htm为框架网页 // --&gt;&lt;/script&gt; 9. ...

    disable-hover:禁用滚动时的悬停效果

    link rel =" stylesheet " href =" bower_components/disable-hover/dist/disable-hover.css " &gt; &lt;/ head &gt; &lt; body &gt; ... &lt; script src =" bower_components/disable-hover/dist/disable-hover...

    uTorrent v1.8.3.15358 Beta/v1.9 build 14981 Beta 多国语言版

    小巧却功能强大的 BT 客户端程序,拥有所有常规功能,内网下载方面不错的表现...- Change: Disabled feed icon has precedence over broken feed icon - Fix: DHT bootstrap failures now have an exponential back-off

    BURNINTEST--硬件检测工具

    test phase" was selected the DTR and RTS lines would be explicitly disabled to prevent any toggling of these lines. Previously these where enabled, but not explicitly toggled. Release 5.3 build ...

    两种CSS3伪类选择器详细介绍

    css伪类选择器对于大家来说最熟悉的莫过于:link,:focus,:hover之类的了,因为这些在平时中是常用到的伪类选择器,现在向大家介绍一下两种新增的Css3伪选择器。 1、UI元素状态伪类 我们把":enabled",":disabled",":...

Global site tag (gtag.js) - Google Analytics