2011-05-04 22 views

回答

3
if(!$('#foo').length){//if the element does not exist  
    $('<div id="foo"/>')//create it 
    .appendTo('#something');//and inject it to the DOM 
} 
相關問題