我有一个textfield
,此刻我禁用了提交按钮时textfield
不hold three charactes
。我现在想要做的也是概述textfield
大胆的红色,仍然有submit
按钮被禁用,但我似乎无法同时勾勒出textfield
并禁用提交button
。jQuery轮廓文本框显示错误
我的禁用提交按钮的代码如下是有可能能够勾画出textfield
时length is < 3
这个函数的作用吗?
心存感激的任何帮助
$(function() {
$('input[name="updateMessage"]').attr('disabled','disabled');
$('input[name="selectMessageForUpdate"]').keyup(function(){
if($('input[name="selectMessageForUpdate"]').val().length < 3)
{
$('input[name="updateMessage"]').attr('disabled','disabled');
}
else
{
$('input[name="updateMessage"]').removeAttr('disabled');
}
});
});
啊,是这个工程的按钮,然后但我想勾勒出'textfield'当字符是'<3' @andreas – CodersSC 2012-03-26 09:09:34
确定编辑我的答案 – 2012-03-26 09:10:44
嗯这仍然不工作:/ – CodersSC 2012-03-26 09:34:25