﻿$(this).scroll(function() {
    var bodyTop = 0;
    if (typeof window.pageYOffset != 'undefined') {
        bodyTop = window.pageYOffset;
    }
    else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {
        bodyTop = document.documentElement.scrollTop;
    }
    else if (typeof document.body != 'undefined') {
        bodyTop = document.body.scrollTop;
    }
    $("#onlinqq").css("top", 150 + bodyTop+"px")
});
$(function() {
    $("ul .onep ul .pic").hover(
        function() {
            $(this).css("border", "solid 1px #a00000");
        },
        function() {
            $(this).css("border", "solid 1px #ffffff");
        })
})
//只能输入数字加小数
$("input[intype=num]").keyup(function() {
    $(this).attr("onpaste", "return false");
    var tmptxt = $(this).val();
    tmptxt = tmptxt.replace(/[^0-9.]/, '');
    $(this).val(tmptxt);
})
//只能输入数字
$("input[intype=int]").keyup(function() {
    $(this).attr("onpaste", "return false");
    var tmptxt = $(this).val();
    tmptxt = tmptxt.replace(/[^0-9]/, '');
    $(this).val(tmptxt);
})