<html><head>
<script language="javascript">
 window.onload = function() {
    
    document.getElementById('btn').onclick = function() {
        document.getElementById('down_load_false').style 这里的代码要怎么写,才能让链接失效的状态变为链接有效?
    }
}</script></head><body>
<div id="down_load_false"  style="a {poorfish:expression(this.onclick=function kill(){return false})}">
<a href="http://www.163.com">www.163.com</a>
</div>
<input type="button" id="btn" value="接触锁定" /> </body></html>

解决方案 »

  1.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <style>
    a {poorfish:expression(this.onclick=function kill(){return false;})}
    </style>
    </head><body>
    <div id="down_load_false">
    <a href="http://www.163.com">www.163.com</a>
    </div>
    <input type="button" id="btn" value="接触锁定" /><script language="javascript">
     window.onload = function() {
        
        document.getElementById('btn').onclick = function() {
    document.getElementById('down_load_false').onclick = function(){return true;}
            //document.getElementById('down_load_false').style 这里的代码要怎么写,才能让链接失效的状态变为链接有效?
        }
    }</script>
    </body>
    </html>
      

  2.   

    <style>没有写在<div id="down_load_false">里 ,没用
      

  3.   

    <script language="javascript">
     window.onload = function() {
        document.getElementById('btn').onclick = function() {
            document.getElementById('kk').onclick=function(){return true;};
        }
    }
    </script>
    </head><body>
    <div id="down_load_false">
    <a id="kk" href="http://www.163.com" onclick="return false">www.163.com</a>
    </div>
    <input type="button" id="btn" value="解除锁定" />
      

  4.   

    <script language="javascript">
     window.onload = function() {
      document.getElementById('kk').onclick=function(){return false;};
      document.getElementById('btn').onclick = function() {
      document.getElementById('kk').onclick=function(){return true;};
      }
    }
    </script>
    </head><body>
    <div id="down_load_false">
    <a id="kk" href="http://www.163.com">www.163.com</a>
    </div>
    <input type="button" id="btn" value="解除锁定" />