J'utilise jQuery et JavaScript. J'ai un événement onclick qui appelle la fonction JavaScript. Comment extraire les arguments de function_A et function_B dans jQuery?Arguments de la fonction JavaScript dans jQuery
Et est-ce la meilleure façon de le faire?
Je dois faire un appel Ajax après un clic JavaScript. Y a-t-il des problèmes de performances avec jQuery?
Mon code:
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
//Here need to extract the JavaScript function arguments
var id1=from_javascript_function_A
var id2=from_javascript_function_B
var link1=from_javascript_function_A
var link2=from_javascript_function_B
//
</script>
</head>
<body>
<a href='#' onclick=javascript:function_A('first',1)>link1</a>
<a href='#' onclick=javascript:function_B('second',2)>link2</a>
</body>
</html>