This doesnt works." />
开发者

Need to sent onclick event string var from hyperlink to javascript event function(e)?

Can someone tell me how i can sent a string from an onclick event to the searchfunction? onclick="SearchFunction("mystring"); -->This doesnt works.

$(document).ready(function() { 
        var SearchFunction = function(e) {
            searchwords=$("#q").val();
             STR=??? -->Needs to get the string from the o开发者_StackOverflow社区nclick hyperlink.

        };
        $("#q").keyup(SearchFunction);
    });


$(this).text() should do it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜