<a href="*.txt" >打开文本文件</a>

解决方案 »

  1.   

    <iframe name=ifrm></iframe>
    <input type=file name=myfile onchange="document.all.ifrm.src=this.value">
      

  2.   

    <a href ="*.txt">xxx</a>
      

  3.   

    <input type=button value=打开TXT文件 onclick='javascript: var wsh=new ActiveXObject("wscript.shell").run("notepad d:\\tt.txt")'>
      

  4.   

    将上面这段代码再改善一下:<input type=file onPropertyChange='if (this.value != "")var wsh=new ActiveXObject("wscript.shell").run("notepad "+ this.value)'>你选中什么文本文件就打开什么文本文件了.