0

So, I was trying to use CSS which will give the onMouseDown impression of the button when it is disabled, to allow the user to know it is disabled, visually.

not sure what to put inside .disableApproveButton was looking for mouse down and stuff....any ideas? thanks

<td><button class="disableApproveButton" type="submit" name="btnApprove" @(string.IsNullOrEmpty(Model.Customer.Email) ? "disabled" : string.Empty)>Approve</button></td>

.disableApproveButton 
{
 //make selection here
}
4

1 回答 1

1

您只需要为您的按钮/提交类型添加禁用属性。

<button type="submit" name="btnApprove" @(string.IsNullOrEmpty(Model.Customer.Email) ? disabled : string.Empty)>Approve</button>

您可能必须根据您的逻辑更改代码,但关键是您必须使用按钮的禁用属性。

JsFiddle 示例:http: //jsfiddle.net/7AzFV/1/

于 2013-06-28T15:52:22.757 回答