一、javascript中定义函数是用var foo = function(){}和function foo(){}有什么区别?

  https://www.cnblogs.com/sharpest/p/6481853.html

  https://blog.csdn.net/weixin_30537451/article/details/99063383

b();
a();
function b(){
  document.write("aa");
}
var a=function(){
  document.write("123");
}

  function b(){} 为函数声明,程序运行前就已存在,var a = function(){} 为函数表达式,是变量的声明,属于按顺序执行,所以a为undefined,不能在函数定义的前面使用它。

 

二、自定义table固定表头,内容滚动

  参考:https://www.cnblogs.com/mengfangui/p/7027393.html

  关键代码:

table tbody {
    display: block;
    height: 80px;
    overflow-y: scroll;
}
table thead,tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

  设置table滚动条样式

  参考:https://blog.csdn.net/weixin_44962808/article/details/103899598

  关键代码:

     table tbody::-webkit-scrollbar {/* 是否隐藏滚动条*/
             /*display: none;*/ 
        }
        ::-webkit-scrollbar {/* 定义滚动条样式 */
            width: 6px;
            background-color: #F0F0F0;
        }
        ::-webkit-scrollbar-track {/*定义滚动条轨道 内阴影+圆角*/
            box-shadow: inset 0 0 0px #0905f3;
            border-radius: 5px;
            background-color: #F0F0F0;
        }
        ::-webkit-scrollbar-thumb {/*定义滑块 内阴影+圆角*/
            border-radius: 10px;
            box-shadow: inset 0 0 0px rgba(240, 240, 240, .5);
            background-color: #0065CF;
        }
            

 

三、marquee标签

  参考:https://www.cnblogs.com/smiler/p/4892918.html

  marquee标签用于实现内容的滚动,在做表格时,单元格的内容可能会超出单元格的宽度,内容显示不全,可以设置为文字设置marquee标签,附加一些属性可以实现内容的滚动。

四、Printwrite知识

  response.getWriter().write()只能打印文本格式的,不能打印对象。

  response.getWriter().write()和 response.getWriter().print()的区别 以及 PrintWriter对象 和 out对象 的区别:https://www.cnblogs.com/tfxz/p/13251776.html

 五、标签自定义属性及获取

  自定义div标签属性并获取

  

<div style="margin-top: 100px;background: red;width: 100px;height: 100px;" value="divvalue" name="divname" data-value="divdata" 
   onclick
="testdiv(this)"> 111 </div>
<script>
  function testdiv(data){
    console.log($(data).attr("name"))
    console.log($(data).attr("value"))
    console.log($(data).attr("data-value"))
  }
</script>

 

  参考:https://blog.csdn.net/xyq286654901/article/details/72730012