Issue: Original page loads text [object window] while invoking Window.open()

Issue:

When you invoke following JS codes in original page,

<a href="javascript:window.open('child.html');">

you can open child.html inside a new widow, but original page will loads following text instead of original  content.

text [object window] 

Reason:

This problem is caused by the return value of Open function.

Solution:

Set ‘void’ as the return type of open function in mandatorily.

<a href="javascript:void(window.open('child.html'));">

你可能感兴趣的:(Issue: Original page loads text [object window] while invoking Window.open())