Home >Backend Development >PHP Tutorial >javascript - jquery获取HTML标签的值并将值传给PHP

javascript - jquery获取HTML标签的值并将值传给PHP

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:30:021406browse

javascript - jquery获取HTML标签的值并将值传给PHP

就像这样 获取不同标签的值 并且在本页传给php

回复内容:

javascript - jquery获取HTML标签的值并将值传给PHP

就像这样 获取不同标签的值 并且在本页传给php

不知道你如何判断选中,假设加了样式selected,那么取得id就是$('selectd').data('id'),是个数组,提交,如果直接提交到本页,将得到的值放入隐藏域即可,如果ajax,放到 ajax 的 data 里面即可。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn