开发者

need help in jquery syntax

开发者 https://www.devze.com 2023-01-11 05:32 出处:网络
I need some help in jquery. I am using autocomplete plugin, I want to send the id of the box as the parameter in js code but not sure the syntax please help me out:

I need some help in jquery. I am using autocomplete plugin, I want to send the id of the box as the parameter in js code but not sure the syntax please help me out:

function suggestName(id)
    {
        //this some help here.....
        $('#'+id).autocomplete("dealer_live.php",{
        width: 150,
        selectFirst: true
        }); 
    }
    $(document).ready(function(){
    alert("");
        suggestName();
    });
    </script>

</head>
<body>
    <form>
    <div>
   开发者_高级运维     <input type="text" id="inputName" onKeyUp="suggestName('inputName')" />
    </div>
    </form>
</body>


suggestName('inputName');

?

You also don't need onKeyUp handler: plugin will take care of it.

0

精彩评论

暂无评论...
验证码 换一张
取 消