呵呵,我会了,
在test.htm中写 
<body onclick="alert(parent.document.activeElement.name)">
就可以了。
document.activeElement是返回当前文档中被击活的标签节点