javascript postMessage not working

前端 未结 4 1428
南笙
南笙 2021-02-03 23:19

I don\'t know what to do. I tried several sample codes from different sources, I tried them in different browsers (from Chrome 9 to FF 4), and still nothing seems to be working

4条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-04 00:01

    you can also send the message to any window use top.postMessage('hello', "*");

    Html 1:

    
    
    

    html 2:

    
    
    
        
    
    

提交回复
热议问题