在 INPUT 控件中使用图像
Use Image in the INPUT control
我有一个 DotNet 核心项目,我试图在 INPUT
标签中使用图像。如果我使用 BUTTON
控件,我将无法调用 asp-page-handler
。
这是我的样本。
<input class="btn btn-primary" type="submit" value="Login to MyApp" asp-page-handler="RedirectToMyApp" />
您将类型更改为 'image' 而不是 'submit'。
<input type="image" src="img_submit.gif" alt="Submit" width="48" height="48">
更多信息请参考这里:https://www.w3schools.com/tags/att_input_type_image.asp
我有一个 DotNet 核心项目,我试图在 INPUT
标签中使用图像。如果我使用 BUTTON
控件,我将无法调用 asp-page-handler
。
这是我的样本。
<input class="btn btn-primary" type="submit" value="Login to MyApp" asp-page-handler="RedirectToMyApp" />
您将类型更改为 'image' 而不是 'submit'。
<input type="image" src="img_submit.gif" alt="Submit" width="48" height="48">
更多信息请参考这里:https://www.w3schools.com/tags/att_input_type_image.asp