编辑div并在刷新页面上更新信息 [英] Edit div and have updated information on page Reload
问题描述
所以我发布了可以编辑或删除的div.看看给定的链接
So i have posted div which can be edited or deleted.Take a look at given link
这是 JS小提琴链接
现在,我希望在html to get updated
中使用原始代码,并在执行Edit
或Delete
操作后显示有关页面刷新/重新加载的更新信息.
Now i want the original code in html to get updated
and show updated information on page refresh/reload after Edit
or Delete
operation is performed.
感谢您的帮助.
推荐答案
保存用户的输入并在页面加载中显示
我建议您单击done
按钮,使用jquery ajax api.jquery.com/jQuery.ajax将来自用户的输入(使用stackoverflow.com/questions/24816/…逃逸)发送到数据库.
I suggest on your done
button click, use jquery ajax api.jquery.com/jQuery.ajax to send the input from the user (escaped using stackoverflow.com/questions/24816/…) to the db.. then encoding it again on the page load when you fill your div with the saved data from the DB..
请注意-使用参数化存储过程将html存储在数据库中..否则,您将容易受到sql注入(google.de/…)–
few notes though - use a parametrised stored procedure to store the html in the database .. otherwise you'll be vulnerable to sql injection (google.de/…) –
这篇关于编辑div并在刷新页面上更新信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!