因此,我对在rails中使用ajax很陌生,我第一次尝试了format.html和format.json。使用ajax提交数据都很好,但是对于format.json,它不运行我希望它在成功提交时运行的命令。if @key.save # Key update runs fine in format.html }
我发现如果我使用System.out.println而不是System.out.format,问题就解决了。但是我想在while循环中使用System.out.format,并理解为什么会发生这种情况?这个程序从用户和排序主题中给出了数组的成员。int[] x = new int[n]; while (i<n) System.out.formatmember %d",i);
x[i] = inpu