无法在弹出框中显示图像

时间:2014-11-25 11:31:10

标签: jquery asp.net


在此代码中,我在弹出框中显示图像。

<script type="text/javascript">
var content2 =document.getElementById('<%= ProfilePicture.ClientID %>');
T$('testclick2').onclick = function () { TINY.box.show(content2, 0, 0, 0, 1) }

<div class="button" id="testclick2"><strong>Image</strong> - <em>click here</em></div>
<asp:Image ID="ProfilePicture" runat="server" alt="Profile Pic" Width="200px" />

<asp:FileUpload ID="ProfilePictureFileUpload" runat="server"/>

1 个答案:

答案 0 :(得分:1)


将您的代码更改为:

<div class="button" id="example1"><strong>Image</strong> - <em>click here</em></div>
<script type="text/javascript">
    T$('example1').onclick = function () { TINY.box.show('<asp:Image ID='img1' runat='server' width='100' height='100' alt='' />', 0, 0, 0, 1) }
</script>