<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function showmsg(str) {
alert(str);
}
function performClick(node) {
var evt = document.createEvent("MouseEvents");
evt.initEvent("click", true, false);
node.dispatchEvent(evt);
}
window.onload = function() {
performClick(document.getElementById("cel1"));
}
</script>
</head>
<body>
<table width="500" border="1" cellspacing="0" cellpadding="0">
<tr>
<td id="cel1" width="244" onclick="showmsg('test')">clique aqui</td>
<td width="256" align="left" ><span style="margin-left:2px"> aaaaaaa </span></td>
</tr>
</table>
<script>
document.getElementById("cel1").click()
</script>
</body>
</html>
|