Emulate clicking a link with Javascript that works with IE

后端 未结 5 931
别那么骄傲
别那么骄傲 2020-12-02 20:40

I want to have java script clicking a link on the page..I found something on the net that suggests adding a function like this:

function fireEvent(obj,evt){
         


        
5条回答
  •  囚心锁ツ
    2020-12-02 21:31

    If you want to simulate clicks only for links, you can use this:

    function clickLink(id){
    location.href=document.getElementById(id).href;
    }
    

提交回复
热议问题