Javascript : how could i get callee id in javascript?
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.
精彩评论