CeramicProject/newyt/Js/screen.js

45 lines
1.4 KiB
JavaScript

//传命名空间
var namespa;
function spasefuzhi(spa) {
namespa = spa;
}
//适应高度
$(document).ready(function () {
var winheight = $(window).height();
$("#t_r_content").css("height", winheight - 95);
})
//同步滚动
function scroll() {
if ($("#div_huizong").length > 0) {
var b = document.getElementById("div_huizong").scrollLeft;
document.getElementById("div_title").scrollLeft = b;
document.getElementById("t_r_content").scrollLeft = b;
}
}
function scrolltow() {
var b = document.getElementById("t_r_content").scrollLeft;
document.getElementById("div_title").scrollLeft = b;
if ($("#div_huizong").length > 0) {
document.getElementById("div_huizong").scrollLeft = b;
}
}
window.onresize = function () {
if (window.outerHeigth == screen.heigth && window.outerWidth == screen.width) {
var winheight = $(window).height();
$("#t_r_content").css("height", winheight - 95);
} else {
var winheight = $(window).height();
$("#t_r_content").css("height", winheight - 95);
}
if ($('#Gjx').css('display') != "none") {
var winheight = $(window).height();
var gjxg = $("#Gjx").height();
$("#t_r_content").css("height", winheight - 95 - gjxg);
}
}
//右键菜单中的html代码
function chuancan(str) {
$(document.body)
.append($(str));
}