我有一個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