显示字段,允许按钮编辑和保存 html
我正在尝试创建一个显示标题和段落以及“编辑”按钮的页面。
目标是段落和标题看起来像普通文本,但是当单击编辑按钮时,它们变成用户可以编辑的可写字段。编辑完成后,用户可以单击“保存”按钮,然后 html 就会更新。
这有可能吗?
此外,是否可以有一个“创建”按钮,添加一个新的标题和段落元素,这些元素是空白的,用户可以填写?
我想坚持使用 html/javascript/jquery,因为它不会在服务器上运行。
谢谢!
I'm trying to create a page where a title and paragraph are displayed, along with an 'edit' button.
The goal is that the paragraph and title seems like normal text, but when the edit button is clicked, they become writeable fields that the user can edit. When the edits have been done, the user can click a save button and the html is updated.
Is this at all possible?
Furthermore, is it possible to have a 'create' button, that adds a new title and paragraph element that are blank, which the user can fill in?
I'd like to stick to html/javascript/jquery, since this won't be running on a server.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
插件已经存在,可以提供就地编辑功能:
Plugin exists already to provide in-place editing functionnality: