DOM refresh on long running function

后端 未结 12 2318
醉话见心
醉话见心 2020-11-27 20:54

I have a button which runs a long running function when it\'s clicked. Now, while the function is running, I want to change the button text, but I\'m having problems in some

12条回答
  •  眼角桃花
    2020-11-27 21:39

    Some browsers don't handle onclick html attribute good. It's better to use that event on js object. Like this:

    
    
    
    

    I made a fiddle with working example http://jsfiddle.net/BZWbH/2/

提交回复
热议问题