在Cmultiplefileupload小部件中我想调用我自己的js函数并想要跟踪小部件id的id
<script>
function inc_id(x)
{
alert(x);
}
</script>
$this->widget('CMultiFileUpload', array(
'name' => 'LeadRecommendations[docs_name][]',
'id'=>'LeadRecommendations_docs_name',
'model'=>$test,
'accept' => 'jpeg|jpg|gif|png|pdf|doc|docx|odt|txt|xlsx|xls|csv|zip', // useful for verifying files
//'duplicate' => 'Duplicate!', // useful, i think
'denied' => 'Invalid file type', // useful, i think
'remove'=>'[x]',
'options'=>array(
'afterFileSelect'=>'function(e, v, m){ inc_id(this.id) }',
),
但它给结果未定义我如何在我的函数中获得这个小部件的id