J'ai ajouté un jquery onclick eventhandler à la table comme suitévénement onclick sur cancel la table en utilisant jquery
$('#tableid').bind('click', ClickHandler);
function ClickHandler(event) {
//here i am checking whether the cell that the user clicked is valid to enter data.
//if not, I would like to cancel the event.
e.preventDefault(); //this is not working. the cell that the user clicked still has focus.
return false; //this is also not working. the cell that the user clicked still has focus.
}
Comment puis-je annuler l'événement, cliquez sur une table?
Existe-t-il un contrôle modifiable à l'intérieur de la cellule qui fait l'objet de la mise au point, ou y a-t-il plus de choses que vous ne le mentionnez? –
J'ai une zone de texte à l'intérieur de la cellule. la zone de texte obtient le focus que je voudrais annuler. J'ai également ajouté des événements keydown, keypress, dblclick, keyup pour gérer la navigation dans la table. – Sridhar