それに対する答えをHERES OK ...
ちょうどその要素がIDまたは名前を渡すとonClickイベントを登録し、uは呼び出された関数で要素IDを持っている...
<html>
<head>
<script type="text/javascript">
function def()
{
myFrame1.document.designMode="on";
myFrame2.document.designMode="on";
document.getElementById("myFrame1").contentWindow.document.addEventListener('click', function(event) {clic("myFrame1");}, false);
document.getElementById("myFrame2").contentWindow.document.addEventListener('click', function(event) {clic("myFrame2");}, false);
}
function clic(id)
{
alert(id + " is clicked/focused");
}
</script>
</head>
<body onLoad="def()">
<iframe id="myFrame1" border="0">
</iframe>
<iframe id="myFrame2" border="0">
</iframe>
</body></html>
私はかなりこれは他のhtml要素でも動作すると確信しています! (dint check it tho)