Difference between revisions of "Template:China Tongji Foot"

Line 60: Line 60:
 
</div>
 
</div>
  
 
+
<!-- ------------javascript code ----------------- -->
 +
<script type="text/javascript">
 +
//页面跳转后根据地址栏中的参数定位
 +
$(function() {
 +
var startIndex = location.href.indexOf("=");
 +
if (startIndex > 0) {  //判断对象是否存在
 +
var locationId = location.href.substring(startIndex+1); //获得锚点  
 +
setTimeout(function(){$('html,body').animate({scrollTop: $("#"+locationId).offset().top-78}, 1500);},200);
 +
    }
 +
});
 +
</script>
 
</body>
 
</body>
 
</html>
 
</html>

Revision as of 12:25, 14 September 2015