我想完全理解如何在静态和动态文件中使用相对和绝对url地址。
~ :
/ :
.. : in a relative URL indicates the parent directory
. : refers to the current directory
/ : always replaces the entire pathname of the base URL
// : always replaces everything from the hostname onwards
当您在没有虚拟目录的情况下工作时,这个示例很简单。但我正在处理虚拟目录。
Relative URI
我设计了一个名为ASP.NET的kk-container.aspx页面,作为控件使用jQuery加载函数在Default.aspx中加载。页面kk-container.aspx有许多HTML控件和javascript事件绑定,如本例所示。
<!--Sample code from kk-container.aspx-->
<div id="kk-container">
<a href="#" id="kk-action">Action</a>
<!--Many HTML con