标签云

微信群

扫码加入我们

WeChat QR Code

I have a bunch of buttons that all use the same .click()method. How can I assign a local jquery variable to the id of the button that was clicked?var $??? = e.target;What I am trying to do is get the text of the button.Thanks


That's Javascript.And your question makes very little sense.

2019年04月20日09分06秒

There's no such thing as a "jquery variable". There's just variables. What does $??? represent? Are you saying you want the actual variable identifier name to be dynamic, based on the button id?

2019年04月20日09分06秒

amnotiam haha! hes asking us what ??? should be in that line.

2019年04月20日09分06秒

Dave: You mean he's asking for advice on the best name for a variable?

2019年04月19日09分06秒

Ok the question was worded badly. Joseph Marikle's answer worked.

2019年04月20日09分06秒