我有一个简单的网页说index.html
,这种锚标记一遍又一遍地出现。
<a href="Systems, communication and control laboratory/Amplitude Modulation and Demodulation (Real time experiment)/Amplitude Modulation and Demodulation (Real time experiment) (Introduction).html">
Amplitude Modulation and Demodulation (Real time experiment)
</a>
<a href="Speech Signal Processing Laboratory/Non-Stationary Nature of Speech Signal/Non-Stationary Nature of Speech Signal (Aim).html">
Non-Stationary Nature of Speech Signal
</a>
我有这个目录结构。
+-- index.html
+-- Systems, communication and control laboratory
+-- BPSK Modulation and Demodulation(Real time experiment)
+-- BPSK Modulation and Demodulation(Real time experiment) (Introduction).html
+-- Speech Signal Processing Laboratory
+-- Non-Stationary Nature of Speech Signal
+-- Non-Stationary Nature of Speech Signal (Aim).html
但是当我点击链接时,会显示webpage not available
错误。
如果你能给我一个关于我不遵守正确的HTML语法的内容的话,我将感激不尽。
答案 0 :(得分:3)
必须对href
属性中的URL进行编码,因为它不能包含空格字符。您可以使用%20
替换空格。
答案 1 :(得分:1)
您的href属性中的网址无效。您不能在网址中包含空格。我建议将文件重命名为:this-is-my-new-file-name.html
。
答案 2 :(得分:0)
根据您的目录结构:
- index.html
+-- Systems, communication and control laboratory
+-- BPSK Modulation and Demodulation(Real time experiment)
+-- BPSK Modulation and Demodulation(Real time experiment) (Introduction).html
+-- Speech Signal Processing Laboratory
+-- Non-Stationary Nature of Speech Signal
+-- Non-Stationary Nature of Speech Signal (Aim).html
这可能有效:
<a href="Systems, communication and control laboratory/BPSK Modulation and Demodulation(Real time experiment)/BPSK Modulation and Demodulation(Real time experiment) (Introduction).html">
BPSK Modulation and Demodulation (Real time experiment)
</a>
<a href="Speech Signal Processing Laboratory/Non-Stationary Nature of Speech Signal/Non-Stationary Nature of Speech Signal (Aim).html">
Non-Stationary Nature of Speech Signal
</a>
某些服务器可能会与空格混淆:)