使用 jQuery 在下拉框前面创建(编辑)超链接
我有一个包含一些数据的表。所有数据都包含在下拉框和文本框中。但不容易看出什么是新写入的输入,什么是来自数据库的数据。
因此,我想在这些框之后创建一个(编辑),并将这些框替换为下拉框中包含的值所在的文字。当按下编辑按钮时,文字消失并出现下拉框,因此可以编辑数据。这就是全部,jQuery 不必将数据保存到数据库,我在保存按钮中具有该功能。
我不想使用任何额外的 jQuery 插件,因为这似乎是一个相当简单的任务。
有什么好主意吗?
I have a table with some data. All data is contained in dropdownboxes and textbox. But it isn't easy to see, what is newly written input and what is data from the database.
So I want to create a (edit) after these boxes, and replace the boxes with a literal where the contained value in the dropdownbox stands. When the edit-button is pushed the literal goes away and the dropdownbox appears instead, so it is possible to edit the data. This is all, the jQuery don't have to save the data to database, I have functionality to that in a save-button.
I don't want to use any extra plugin to jQuery, because it seems to be a fairly simpel task.
Any good ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我无法在这里编写整个代码,请根据您的意愿进行更改。我没有清除您的问题。
试试这个
编辑后单击编辑
stylesheet.css
时只需反转代码;
Thw whole code i cant write here, change as your wish.I didn't clear your question.
try this
when click edit
stylesheet.css
after edit just reverse the code;