开发者

Javascript : how could i get callee id in javascript?

开发者 https://www.devze.com 2023-03-07 17:35 出处:网络
How could I get callee id in javascript I am creating dynamic gridview from .cs adding templates to gridview as per requirement. In which first headercolumn is having checkbox. I wanted to 开发者_开发

How could I get callee id in javascript

I am creating dynamic gridview from .cs adding templates to gridview as per requirement. In which first headercolumn is having checkbox. I wanted to 开发者_开发知识库call javascript function on click , here I want callee checkbox id in javascript.


You'll want the source of the click event. Make sure the event is sent in the clickhandler (as in onclick="myClickHandler(event)"), then:

function myClickHandler(evt){
  var sourceElement = evt.srcElement || evt.target;
  /* do things */
}


It depends on the browser.

Microsoft will use window.event.srcElement to handle a reference to the object that fired an event.

W3C support browsers will pass the reference as an argument to the event handler.

Try this.

0

精彩评论

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