<script type="text/javascript" language="javascript"> function ShowDialog(url) { var iWidth=700; //模态窗口宽度 var iHeight=300;//模态窗口高度 var iTop=(window.screen.height-iHeight)/2; var iLeft=(window.screen.width-iWidth)/2; window.open(url,"Detail", "Scrollbars=no,Toolbar=no,Location=no,Direction=no,Resizeable=no, Width="+iWidth+" ,Height="+iHeight+",top="+iTop+",left="+iLeft) } </script>
<ItemTemplate>
<input id="Button2" type="button" value="编辑" onclick="ShowDialog('xg_kskm.aspx?id=<%#Eval("id").ToString()%>')" />
</ItemTemplate>
</asp:TemplateField>
function ShowDialog(url)
{
var iWidth=700; //模态窗口宽度
var iHeight=300;//模态窗口高度
var iTop=(window.screen.height-iHeight)/2;
var iLeft=(window.screen.width-iWidth)/2;
window.open(url,"Detail",
"Scrollbars=no,Toolbar=no,Location=no,Direction=no,Resizeable=no, Width="+iWidth+" ,Height="+iHeight+",top="+iTop+",left="+iLeft)
}
</script>
============我用的这种方法但是出来以后是这样的:<a onclick=window.open('RoomTyp.aspx?htl_cd=06&rm_cd=BA,'popuppage','width=400,height=380,top=130,left=200,scrollbars,resizable') style='CURSOR: hand'>标A</a>吧html代码直接给显示出来了
<a href="" onClick="javascript:window.open('RoomTyp.aspx?htl_cd=06&rm_cd=BA');">标A</a>而不是:
标A????
在Row绑定的时候加Url加到LinkButton上