赞
踩
var ishttps = 'https:' == document.location.protocol ? true: false;if(ishttps){alert('https');}else{alert('http');}