getElementById problem in Google Chrome

前端 未结 2 2044
有刺的猬
有刺的猬 2021-01-19 01:27

I have this simple line

alert(window.parent.frames[0].document.getElementById(\'textToSearch\').value);

I have 2 frames, first with a text

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-19 02:08

    Finally i figure what was the problem. I try the code from above on Google Chrome on a system local file. Due the security settings of Google Chrome this usecase is impossible. If i move all files on a web server this will work as a charm Thanks all for your support, this thread can be closed now

提交回复
热议问题