<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
*{padding:0;margin:0;}
li{list-style:none;}
input{outline:none;}

.ft0{font-size:0;}
.fw{overflow:hidden;}

#meque{width:1000px;height:30px;line-height:30px;margin:0 auto;overflow:hidden;position:relative;}
#meque_text{white-space:nowrap;position:absolute;left:0;top:0;cursor:pointer;}
</style>

</head>
<body>
<div id="meque">
<p id="meque_text">JS 教程 JS 简介 JavaScript 是属于网络的脚本语言! JavaScript 被数百万计的网页用来改进设计、验证表单、检测浏览器、创建cookies,以及更多的应用</p>
</div>
<script>
(function () {
var mequeText = document.getElementById('meque_text'),
meque = document.getElementById('meque'),
timer = null;
mequeText.style.left = meque.offsetWidth + 'px';
clearInterval(timer);
timer = setInterval(notice, 20);
notice();
function notice () {
if (mequeText.offsetLeft < -mequeText.offsetWidth) {
mequeText.style.left = meque.offsetWidth + 'px';
}
mequeText.style.left = mequeText.offsetLeft + -2 +'px';
}
mequeText.onmouseover = function () {
clearInterval(timer)
};
mequeText.onmouseout = function () {
timer = setInterval(notice, 20)
};
mequeText.onmousedown = function (ev) {
var ev = ev || window.event;
var disX = ev.clientX - this.offsetLeft;
mequeText.onmousemove = function (ev) {
var ev = ev || window.event;
mequeText.style.left = ev.clientX - disX + 'px';
};
document.onmouseup = function () {
mequeText.onmousemove = null;
}
}
})();
$(function () {
$.getJSON("/data/json/notice.json", function (response) {
$('.marNote').html(response.roll_notice.noticeContent)
})
})
</script>
</body>
</html>