Home > Backend Development > PHP Tutorial > 关于jquery的问题!求各位大神指教!

关于jquery的问题!求各位大神指教!

WBOY
Release: 2016-06-23 13:23:15
Original
791 people have browsed it


如图所示,每次点击添加按钮时下面会增加一行,选择药品之后,点击前面的那个“+”会把药品详情显示出来。这个效果我已经实现了,现在我想要的效果是:没选择药品名称和点击前面的“+”展示详情时让添加药品按钮失效!有点理不清思路,哪位大神有空帮忙指点下,小弟感激不尽!


回复讨论(解决方案)

下面没有数据时点击添加按钮时会增加一行,所以我总感觉会跟上面冲突!

检查最后一个 请选择 下拉框的值

这还不简单么。直接操作元素事件呀

点击+时,判断下拉框选择的值。如果值未选择,则停止后面的操作。

早上已经解决了!谢谢各位的回答!

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template