js代码
<SCRIPT type="text/javascript">
var BackgroundImage = '@System.Web.Configuration.WebConfigurationManager.AppSettings["BackgroundImage"]';
</SCRIPT >
web.config配置信息
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data" requirePermission="true" />
<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<appSettings>
<add key="IsLog" value="YES" />
<add key="IsSendMail" value="YES" />
<add key="BackgroundImage" value="../WorkFolder/Upload/Background/2020-02-27 11_16_55-Postman.png" />
</appSettings>