追加ボタンをクリックするとjqueryを使用して動的に入力フィールドを作成するページを作成しています。入力フィールドでは機能していますが、選択フィールドでは機能しません。選択フィールドは、名前フィールドの変更なしに繰り返されます。だから私は$ _GET経由でこれらの詳細を取得する際に問題を抱えています。 Plzソリューションをできるだけ早く与える。jqueryを使用して動的入力フィールドを作成しているときに、選択型入力では機能しません。
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link href="nietsms.css" rel="stylesheet" type="text/css" />
<title> NIET Store Management System BY SDC </title>
<script type="text/javascript" src="http://cachefile.net/scripts/jquery/1.2.3/jquery-1.2.3.min.js"></script>
<script type="text/javascript">
$(function(){
var newRowNum = 0;
$('#addnew').click(function(){
newRowNum += 1;
var addRow = $(this).parent().parent();
var newRow = addRow.clone();
$('input', addRow).val('');
$('td:first-child', newRow).html(newRowNum);
$('input', newRow).each(function(i){
var newID = newRowNum + '_' + i;
$(this).attr('id',newID).attr('name',newID);
});
addRow.before(newRow);
フィールドは同じ場所に残り、選択ドロップダウンメニューは次の行に移動します。それは最初の列にのみ残る必要があります。 PLZはこれを解決する方法を教えてください。 – user1306331