+
95
-

回答

var ishttps = 'https:' == document.location.protocol ? true: false;

if(ishttps){
alert("这是一个https请求");

}else{
alert(“这是一个http请求”);

}

网友回复

我知道答案,我要回答