How do undefined or remove a javascript function?

后端 未结 5 915
不知归路
不知归路 2021-02-06 00:05

I defined a global Javascript function:

  function resizeDashBoardGridTable(gridID){
  var table = document.getElementById(\'treegrid_\'+gridID);
        .....
          


        
5条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-06 00:32

    The simplest approach is to set the function (treat it as a variable) to null. This works even if you don't declare it as a var. Verified this on IE.

    resizeDashBoardGridTable = null
    

提交回复
热议问题