我有三个文件...第一个 index.tpl.php 代码是
<td>
<input type="button" name="checkbox" value="delete" onclick="selectAccess('<?php echo __('are you sure you want to delete data')?>','<?php echo $sGroups['id_user']; ?>')">
</td>
第二个是 common.js
function selectAccess(message,AccessId){
var answer = confirm(message)
alert(AccessId);
if (answer)
{
$.ajax({
url: SITE_URL + '/users/delete',
type: 'POST',
data: {
'ID':AccessId
},
success: function(data){
alert(data);
}
});
}
}
在这里它不起作用......请告诉我错误在哪里......