ajax和js没合作!! [英] ajax and js not working together!!

查看:46
本文介绍了ajax和js没合作!!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




对ajax和js来说很新。我尝试在我的jsp中使用ajax进行服务器验证。我还使用js进行客户端验证


我在单独的文件中使用我的js脚本进行客户端验证。我将ajax代码嵌入到jsp本身中。


客户端验证和ajax代码在我单独使用时工作。

但是当我尝试要同时使用它们,客户端验证根本不会发生。我的页面被直接发送到服务器中的验证servlet。


在单个jsp文件中包含两个单独的js文件是一个问题吗?


请帮助我!!



am very new to ajax and js . i tried using ajax for server validation in my jsp. i also used js for client side validation

i have my js script for client side validation in a seperate file. i embedded the ajax code in the jsp itself.

the client side validation and the ajax code are working when i use them seperately.
but when i try to use them both , the client side validation is not taking place at all. my page is directly dispatched to the validation servlet in the server .

is it a problem to include two seperate js files in a single jsp file?

pls help me out!!

推荐答案

没有代码,我们只能猜测。显示您的代码或测试页面的链接。
Without code, we can only guess. Show your code or a link to a test page.


这是我试过的jsp页面

this is the jsp page i tried

展开 | 选择 | Wrap | 行号


在第73行,更改
On line 73, change
展开 | 选择 | Wr ap | 行号


这篇关于ajax和js没合作!!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆