如何从jsp页面通过id访问html标签 [英] how to access html tag by id from jsp page
本文介绍了如何从jsp页面通过id访问html标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用jsp.in创建了一个网页,其中包含3个子jsp页面。要做javascript验证我需要从一个jsp页面到另一个jsp页面获取一个特定的html标签id。请你帮我解决这个问题。
I have created one web page using jsp.in which i included 3 sub jsp pages . to do javascript validation i need to get one specific html tag id from one jsp page to another jsp page .can you please help me to get the solution for this.
推荐答案
嗨
有两种选择:
普通JavaScript
Hi
There are two options:
Plain JavaScript
var ele = document.getElementById("id");
或者如果你使用的是jQuery
Or if you are using jQuery
var ele =
( #id);
或者你想按标签选择?
Or do you want to select by tag?
这篇关于如何从jsp页面通过id访问html标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文