前端html
<select name="superlabel" id="superlabel">
{volist name="allRes" id="vlabels"}
<option value="{$vlabels.svid}">{$vlabels.svlabel}</option>
{/volist}
</select>
前端js
<script>
$('#superlabel').change(function(){
a=$(this).val();
$.ajax({
type:"POST",
dataType:"json",
url:"{:url('videosearch/label')}",
data:'superlabel='+a,
success:function(data){
alert(data);
},
error:function(data){
alert('none');
}
});
});
</script>
后端(PHP)
public function label(){
return($_POST['superlabel']);
}
网友评论