我是javascript编程的新手,有人可以帮助我实现我的需求。我需要在调用此javascript文件时将返回值赋给变量,这应该在javascript文件中完成。我甚至不确定我的代码是否正确。
(function() {
return {
css: [
{ file: 'css/theme-default.css' }
],
js: [
{ file: 'config.js' }
],
placeHolder: {
content: {
version: '2.0',
developer: 'Sibiraj'
},
sitelogo: {
visible: true,
content: {
title: 'Home'
}
},
},
bodyClass: 'default-v_3.0'
};
});
答案 0 :(得分:0)
创建一个新函数并在document.ready函数上调用此函数,如下面的代码段
Set-ExecutionPolicy UnRestricted
$acl = Get-Acl -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings"
$acl | Format-List
$user = New-Object System.Security.Principal.NTAccount("Domain\User.Test")
$permission = [System.Security.AccessControl.RegistryRights]"FullControl"
$inherit = [System.Security.AccessControl.InheritanceFlags]::None
$propagation = [System.Security.AccessControl.PropagationFlags]::None
$type = [System.Security.AccessControl.AccessControlType]::Allow
$rule = New-Object System.Security.AccessControl.RegistryAccessRule($user, $permission, $inherit, $propagation, $type)
$acl.RemoveAccessRuleAll($rule)
$acl | Set-Acl
$(function(){
var data=Getdata();
})
function Getdata()
{
return {
css: [
{ file: 'css/theme-default.css' }
],
js: [
{ file: 'config.js' }
],
placeHolder: {
content: {
version: '2.0',
developer: 'Sibiraj'
},
sitelogo: {
visible: true,
content: {
title: 'Home'
}
},
},
bodyClass: 'default-v_3.0'
};
}