画像をアップロードするために使用しているtype="file"
のhtml入力タグを無効にしようとしています。ラジオオプションを使用して「はい」または「いいえ」を示します。ユーザーが「いいえ」をクリックすると、入力テキストボックスが無効になります。これは私が使用したコードですが、私は何が間違っているのか分かりません。Jqueryを使用して入力を無効にするテキストボックスタイプ=ファイル
<html>
<head>
<title>test</title>
<script src="assets/js/jquery-1.11.1.min.js"></script>
</head>
<body>
<div class="form-group" style="">
<p> Indicate Payment Method:</p>
<input id ="inptrue" type="radio" name="pmethod" value="Yes">Yes<b>
<input id="inpfalse" type="radio" name="pmethod" value="No">No;
</div>
<div class="form-group">
<label for="file">Upload your Payment Evidence: <i>for Bank Deposit only</i></label>
<input id="images" type="text" name="file" class="form-first-name form-control">
</div>
<script type="javascript/text">
$('#inputattrib').change(function() {
$('#images').prop('disabled', false);
});
$('#inputattribf').change(function() {
$('#images').prop('disabled', true);
});
</script>
</body>
</html>
その型は、 '#のinputattrib'何ですか?' <入力のid = "画像" タイプ= "テキスト" ' –
をファイルではありませんか – Rohit
@モハマドあなたは完全に質問の男を破壊しました。 –