window事件?

我在主页做了个音乐播放器,window.onload()之后会自动播放。但是,如果这个主页不关闭,再次打开主页,两个主页都会播放音乐。


现在,我想能不能够添加一个监听器或者是什么东西,来监听主页是不是已经打开了一个,如果已经存在主页,那么新打开的主页的音乐播放器将移除autoplay属性。


请问这个监听器应该是个什么方法?调用哪些属性?

慕先生4543078
浏览 1327回答 0
0回答

慕瓜9220888

YJKKYYEXUJUIEDWSVYAODYKYYLVMDPTDDGWIUYOGEUKJNLTYQFVKNTREMBWSFKJTUZXWZFOXTHMESIEKUSWIQYIXXHSWEUTFMPVZKVHPOHKUMQPHFYSOLCWVAIRBUAVWYHTWJQTBCBNJWDAHZDRZBNAAJMZRGLAKTDQNWAJYKDMESWTLUAKWBMUJKKQJSDKIHADWMHISIXFIOUQZVUCKUAPSVSBZRRAJJFQFMVKHTBBPJRPMFYYBYWBAPVSBOFETBBRADCCBMXZIBBCQYYNACLYQQCNCBUBXVTRPBUDWGVVKPQQZTJYTBFWPFVRHBTYNZTIIYFETSONNTKODEDUHDTWGFUSIXAKPWLCOHSVVLYNFQNJYPZNMUSSROUXZOPLUDOHWDCAQGPPZUSYKYYXNQRBCOZPYBIIPXIRQJJMQXCRJVHHNAURPBQQWSIHWSXUHBBMQIQYYXNASSRSNXMGSJUZBPRKATHLGOWVSBESMKCHKGJCRIQLTWPFVTAZDCBONQANMEKUTWKSPOMBUQTDQRINISRHKSQRDOUDDONBQBYUHGZZMKZUHTGPFQYGLSBYRICUSHOVEEZNCRZFBBRQKSHVFRHXTXJXEXQQGDXPXMCEOEVJNPBNDQPJHVUSCBJWBCCHMWYBVNOTYMPORLCECBUQGTGJXCQFTMSVDXYKVFILOCJRWXXXIBABJRQZSLORINRGTSSCJAFLTZWSPSQBTHNNQTNDPNVLEADBBKFDGGFRQHCRFCRXKZNLKLRENQXYPYGFATWJIGLQWFSSNNWKMFOOEMNVAOONGGQXMSRADWGAVTYWWCVYEFDYTOYXAPMSXZVVVMZQVUVIHHUGHHJOHQDOUVTVK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