我现在要做一个画面上面有连接,通过点击链接可以打开和这个连接相对应的文件,文件格式有多种。请教各位前辈。

解决方案 »

  1.   

    通过点击链接可以打开和这个连接相对应的文件
    文件格式有多种//打开txt
    public static void main(String[] args) throws IOException { 
    // 设置文件路径 
    String fileName="E:\\a.txt"; 
    Runtime rt = Runtime.getRuntime(); 
    String exePath = "notepad.exe " + fileName; 
      rt.exec(exePath);  }
      

  2.   


    怎样用JS打开一个.txt文件? 
    http://topic.csdn.net/t/20040730/16/3227331.html
    如何打开上传的文件  <input  type="file"/>是不是这个还是别的什么意思