我想,当我点击功能处理下方的表格行时...我得到输出但是当我双击然后只显示结果..但我需要单击结果
这是我的javascript:
function found(row) {
if (document.getElementById('ridee').checked)
{
var table=document.getElementById("table");
var rows = table.getElementsByTagName("tr");
for (var i = 0; i < rows.length; i++)
{
rows[i].onclick = (function()
{ // closure
return function() {
$('#loading').show();
var result = this.cells[1].textContent;
var plate = this.cells[6].textContent;
var km = this.cells[7].textContent;
var dataString = 'plate=' + plate + '&km='+km + '&res='+result;
$.ajax({
type: 'POST',
url: 'km.php',
async: true,
data: dataString,
cache: false,
global: false,
success: function(result)
{
$('#loading').hide();
var answer = confirm(result);
if (answer == true)
{
return test();
}
}
});
}
})(i);
}
}
else {
alert("You are rider... So, You can't select");
}
}
我认为返回功能有问题..但没有返回功能不起作用..请任何人帮忙
提前致谢..