Javascript IF statement
Javascript IF statement
嗨,我有这段代码,它工作正常,并将两个日历显示到一个日历中。我还有一个php
变量$login_session
其中包含登录电子邮件地址的用户。
关于我如何显示日历的任何想法example@hotmail.com
(伪代码)
IF $login_session == "example2@hotmail.com"
ELSE $login_session == "example3@hotmail.com"
显示en.uk#holiday@group.v.calendar.google.com
日历?这能做到吗?
任何帮助不胜感激
googleCalendarApiKey: 'AIzaSyDcnW6WejpTOCffshGDDb4neIrXVUA1EAE',
eventSources: [
{
googleCalendarId: 'example@hotmail.com',
},
{
googleCalendarId: 'en.uk#holiday@group.v.calendar.google.com'
}
],
<?php
if ($login_session == "B.Barry@nhs.org") {
$calendar = "example@hotmail.com";
} else {
$calendar = 'en.uk#holiday@group.v.calendar.google.com';
}
?>
googleCalendarApiKey: 'AIzaSyDcnW6WejpTOCffshGDDb4neIrXVUA1EAE',
eventSources: [
{
googleCalendarId: '<?php echo $calendar; ?>',
}
],
相关文章:
- Jquery else if statement
- Rails 3 if statement with jQuery?
- JQuery Else if statement?
- 在jQuery .load Ajax之后执行if-statement
- Javascript if statement if (ball.style.left === '0px'
- If-Statement中的Javascript元素验证
- Javascript document.cookie if statement
- Javascript Logic In a loop/if statement
- Javascript if statement Google Tools
- Javascript IF statement
- ActionScript 3 If/ Else If Statement
- Javascript if-statement vs. comparsion
- Javascript condense if statement
- 嵌套的 if's:使用 if (x) {statement;} 还是 if (!x) 返回更好;陈述;
- Javascript optimizing if statement
- Javascript and CSS if statement
- JQUERY, AJAX if else statement
- Vuejs IF statement
- Datatables Find Replace If Statement
- javascript msgbox if statement