$('#remNew1')
.live(
'click',
function() {
var targetId = $('#newfileid').val();
var fileName = $("#" + targetId).val();
var cnt = parseInt($("#noOfFiles").val());
var agree = confirm("Are you sure? If you choose OK,
This Template will be Removed");
if (agree) {
$(this).parent().parent().remove();
$('#listfiles tr').each(function (i) {
var index = i + 1;
$('td:first .file_name', this).text('File ' + index + ':');
})
somethingChanged = true;
cnt = cnt - 1;
$("#noOfFiles").attr("value", cnt);
if (fileName == undefined) {
window.location = "files_formulae.htm?projectId="
+ $;
{
project.projectId;
};
}
} else
return false;
});
});
我的表格如下:
<table>
<td><input type="text" name="name" value="aaa"/></td>
<a id="remNew1" href="#" class='delete-file'>Delete file</a>
</td>
</table>
<a href="#" id="addNew" class='add-file'>Add additional file</a>
答案 0 :(得分:0)
这是由于语法不正确:
{
project.projectId;
}
正确的是:
(
project.projectId;
)