是否可以在AJAX回调中调用自定义JS函数?
function MY_MODULE_ajax_callback() {
// Define a new array to hold our AJAX commands.
$ajax_commands = array();
// Create a new AJAX command that replaces the #page text with our own text.
$ajax_commands[] = [CUSTOM JS FUNCTION]
// Return our commandS
return array('#type' => 'ajax','#commands' => $commands);
}
是的。或者至少应该有可能。有什么特别的问题吗?
—
Mołot