本文介绍了SyntaxError:缺少形式参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码有一些错误。也许有人可以帮助我。我得到这个错误:

  SyntaxError:缺少形式参数
function col(10,10) {

这是我的代码:

 < script type =text / javascript> $(<?= $ result ['seats_count']?>,<?= $ result ['booked']?>){
if((<?= $结果['seats_count']?>><?= $ result ['booked']?>))$('。table.table-bordered.booking tbody tr')。css(background-color , #F55);
};
< / script>


解决方案

A 是以逗号分隔的。



标识符只能开始使用 IdentifierStart

Identifiers cannot begin with a number, so 10 is not a valid formal parameter. In creating your col function code, your PHP code must produce formal parameter names that each begin with a letter (or one of the other valid beginning characters, as above).

这篇关于SyntaxError:缺少形式参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 10:29