📜  HTML | onscroll 属性

📅  最后修改于: 2021-11-03 06:26:33             🧑  作者: Mango

当滚动元素滚动条时,此 onscroll 属性起作用。要在元素中创建滚动条,请使用 CSS 溢出属性。
支持的标签:它支持所有 HTML 元素。

句法:

属性:所有 HTML 元素都支持此属性,并且该属性在脚本触发时起作用。
例子:

html


 

    onscroll attribute
    

 

 
    

GeeksforGeeks

    

onscroll attribute

      
      GeeksforGeeks: A computer science portal for       geeks.It ia a good wqebsite for learning computer       science. It has a good programming Question and have       many Interwiew Experiences. Prepare for the Recruitment       drive of product based companies like Microsoft,       Amazon, Adobe etc with a free online placement       preparation course. The course focuses on various       MCQ's & Coding question likely to be asked in the       interviews & make your upcoming placement season       efficient and successful.     
            


输出:

支持的浏览器: onscroll属性支持的浏览器如下:

  • 谷歌浏览器
  • IE浏览器
  • 火狐
  • 歌剧
  • 苹果浏览器