开发者

need help in jquery syntax

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜