代码之家  ›  专栏  ›  技术社区  ›  Stephen Way

VB.Net加载JS文件(如果文件存在)

  •  0
  • Stephen Way  · 技术社区  · 15 年前

    1 回复  |  直到 15 年前
        1
  •  1
  •   Residuum    15 年前
    <% 'If the portal.js exists, insert %>
    <% if System.IO.File.Exists(Server.MapPath(PortalSettings.HomeDirectory & "portal.js")) then %>
    <script src="<%= PortalSettings.HomeDirectory %>portal.js"></script>
    <% end if %>