【问题标题】:Image is Clickable, without no hyperlink case surrounded图片是可点击的,没有包围超链接的情况
【发布时间】:2010-07-16 09:05:40
【问题描述】:

如何去除图片的可点击性?

如你所见,图片上没有显示...

img的代码:

<input name="ui_taskFormControl$ctl03$ctl00$ctl03$ui_BirthPlaceImage" height="20" id="ui_taskFormControl_ctl03_ctl00_ctl03_ui_BirthPlaceImage" type="image" src="SmartPenHandler.ashx?FormId=XYZ&FieldId=BirthPlace" complete="complete"/>

alt text http://www.freeimagehosting.net/uploads/9f11efd474.jpg

【问题讨论】:

  • 私有 HtmlInputImage ui_BirthPlaceImage;输入像上面那样初始化。

标签: c# asp.net html interface


【解决方案1】:

图像类型的&lt;input&gt; 是表单提交按钮的一种形式。如果您想要一个不可点击的图像,只需使用老式的&lt;img&gt; 标签。如果您希望它保留为&lt;input&gt;,可能还有其他方法,但使用&lt;img&gt; 将是您最简单的解决方案。

【讨论】:

  • 私有 HtmlInputImage ui_BirthPlaceImage;输入像上面那样初始化。我怎样才能在这种工作方式中取得成就?
  • 示例代码: 如何在 c# ref:hscripts.com/tutorials/html/… 上禁用它
  • @blgnklc: 你需要它是一个禁用的 而不是 吗?如果图像很好,您想要的对象是 HtmlImage。
  • 我找到了答案:ui_SmartPenFieldImage.Disabled = true;谢谢先生!
【解决方案2】:
 ui_BirthPlaceImage.Disabled = true;

【讨论】:

    猜你喜欢
    • 2012-12-18
    • 2021-05-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-12
    • 2021-08-18
    • 2019-04-16
    • 2012-05-17
    相关资源
    最近更新 更多