How do I hide javascript code in a webpage?

前端 未结 11 810
时光取名叫无心
时光取名叫无心 2020-11-22 17:17

Is it possible to hide the Javascript code from the html of a webpage, when the source code is viewed through the browsers View Source feature?

I know it is possibl

11条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 17:47

    You could use document.write.

    Without jQuery

    
    
    
    
    
    

    Or with jQuery

    $(function () {
      document.write("

    You cannot find this in the page source. (Your page needs to be in this document.write argument.)

    ") });

提交回复
热议问题