我需要轉換單選按鈕以在jquery中選擇框。如何轉換單選按鈕以在jquery中選擇
我有下面的代碼,但它不會產生什麼,我需要:
$j('#product_addtocart_form input[type=radio]').each(function(i, checkbox){
var $checkbox = $j(checkbox);
// create a select
var $select = $j('<select></select>');
// set name and value
$select.attr('name', $checkbox.attr('name')).attr('value', $checkbox.val());
$select.append(new Option('test','tet'));
//$checkbox.remove();
});
「請做我的工作」 的問題將被關閉,始終。 – karim79
PLZ發送ME TEH COEDZ – Jason