jQuery(function($){
$('#url').bind('keyup blur',function(){
var self = $(this);
var txt = self.val();
var txtLength = txt.length;
if(txt && txtLength>0){
if(txt.match(/^https?\:\/\/\S+\.\w+/)){
self.next().remove().end().after('<span class="ok">valid</span>');
}else{
self.next().remove().end().after('<span class="err">正しいURLを入力してください</span>');
}
}else{
$(this).next().remove();
}
});
});