我有一个动态表单,在提交时需要是同步的,我已经知道jquery是用ajax实现的,但是在我的例子中,我不能使用jquery,可以用普通的JS来实现吗?
我的代码:
//I need put the loading GIF from here.
//create dynamic form
var formularioElement = document.createElement('form');
formularioElement.setAttribute('id', 'formSync');
formularioElement.met
我对jQuery不是很熟悉。我正在尝试制作一个表单,这是在后台提交的,而不是重新加载页面。
我有一个隐藏的div,它在点击时显示和隐藏,在div中有一个表单。
我有两个问题:
1)当表单验证失败时,仍会提交表单。我尝试将验证和提交代码放在condition if(validation == valid) { $.ajax.... }中,但它不能正常工作。
2)表单提交后,div会自动隐藏,看不到成功消息。
代码如下:
$().ready(function() {
// Validate the form when it is submitted, using validation
是否可以在将runnable对象提交给executor服务(具有无界队列的单线程)后对其进行修改?
例如:
public class Test {
@Autowired
private Runner userRunner;
@Autowired
private ExecutorService executorService;
public void init() {
for (int i = 0; i < 100; ++i) {
userRunner.add("Temp" + i);