Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Javascriptに変数があります:
var test ="whatever"
この変数を非表示の入力内に渡したいだけです。
<input type="hidden" class="myinput" value="">
私は試した:
$('.myinput').attr('test');
しかし、それは機能していないようです。
ご協力ありがとうございました。
.val
以下のコードを参照してください。
$('.myinput').val(test);