<!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>无标题文档</title>
<script>
window.onload=function()
{
var oA=document.getElementsByTagName('a')[0];
oA.onclick=function()
{
alert(this.parentNode.id);//得到父级ID
//你可以尝试改写到a 的href中
this.href=this.href+'&parentId='+this.parentNode.id;
//把父级id加到链接中
}
}
</script>
</head><body>
<table>
<tr>
     <td id="add">

<a href="__APP__/Upload/index?&maxselect=2&dirlist=&keepThis=true&TB_iframe=true&height=300&width=600" title="添加图片" class="thickbox">添加图片</a>  

</td>
    </tr>
</table>
</body>
</html>