我在wordpress中工作。我从数据库中提取数据并在下拉菜单中显示。 而我的代码是这样的。复选框不显示下拉值
<select multiple="multiple" class="tole_int">
<?php
global $wpdb;
$query_interest = "select p.* from wp_posts as p where p.post_type = 'interests' and p.post_name !='' ";
$tolerancetypes = $wpdb->get_results($query_interest,OBJECT);
foreach($tolerancetypes as $key=>$interest)
{
?>
<option value="<?php echo $interest->ID; ?>"><?php echo ucfirst($interest->post_name); ?></option>
<?php
}
?>
</select>
我写了multiple =“multiple”属性来选择多个值。但我想添加复选框和值。那我该写些什么呢?
我不想显示没有和选定的值。那么我需要写什么jQuery? –