打开HTML文件中的代码文件并转到给定的行号

时间:2021-03-05 09:58:46

I have a XSl file which reads an XML file and create an HTML file.

我有一个XSl文件,它读取XML文件并创建一个HTML文件。

In the HTML file there are some links which refer to some files and a number line of the file(all file are codes). I would like to know that how can I write a code in Javascript so that by clicking in the link opens the file in Notepad++ and shows the line which is referred by the number.

在HTML文件中有一些链接引用一些文件和文件的数字行(所有文件都是代码)。我想知道如何在Javascript中编写代码,以便通过单击链接在Notepad ++中打开文件并显示由数字引用的行。

For example let's I have the following link:

例如,让我有以下链接:

C:\test\test.py (42)

Then by clicking in the link I would like to ope the above file and go to the line number 42.

然后点击链接,我想打开上面的文件,然后转到第42行。

1 个解决方案

#1


0  

Thanks to @Jaromanda. Here is the answer:

感谢@Jaromanda。这是答案:

C:\Program Files (x86)\Notepad++\notepad++.exe" C:\test\test.py -n42

#1


0  

Thanks to @Jaromanda. Here is the answer:

感谢@Jaromanda。这是答案:

C:\Program Files (x86)\Notepad++\notepad++.exe" C:\test\test.py -n42