小编bri*_*ill的帖子

Jquery:Selector找不到类?

我正在尝试推进Jquery-autcomplete功能.我希望Jquery-autocomplete在表中创建新行.这到目前为止工作.但我希望Jquery添加一个删除按钮.因此,用户可以删除其中一个添加的项目.

    $(document).ready(
function() {


//create an new <tr> <td> in #log   
    function log( message ) {
        $("<tr> <td>"  + message + "<input class='Entf' type='button' value ='Entfernen' />" + "</td></tr>").appendTo("#log");
        $( "#log" ).attr( "scrollTop", 0 );}


// get the values from a json-source
        $( "#REMOTE" ).autocomplete({
            source: "json.php",
            minLength: 0,
            select: function( event, ui ) {
                log( ui.item ?
                    ui.item.value + " aka " + ui.item.id :
                    "Nothing selected, input was " + this.value );}
});


// this is just a …
Run Code Online (Sandbox Code Playgroud)

javascript jquery jquery-selectors

3
推荐指数
1
解决办法
6372
查看次数

标签 统计

javascript ×1

jquery ×1

jquery-selectors ×1