<script type="text/javascript">
$(function () {
change();
})
window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", change, false);
function change() {
//手機橫屏
if ((typeof window.orientation != "undefined" && (window.orientation == 90 || window.orientation == -90)) || (typeof window.screen.orientation != "undefined" && (window.screen.orientation.angle == 90 || window.screen.orientation.angle == -90))) {
$("#ckeck_horizontal").attr("class", "horizontal");//修改樣式
}
//手機豎屏
if ((typeof window.orientation != "undefined" && (window.orientation == 180 || window.orientation == 0)) || (typeof window.screen.orientation != "undefined" && (window.screen.orientation.angle == 180 || window.screen.orientation.angle == 0))) {
$("#ckeck_horizontal").attr("class", "title");//修改樣式
}
}
</script>