简体   繁体   English

我想将我网站的内容永久添加到html中

[英]I want to add content from my website to the html permanently

I want to build a website in which users can add information, like craigslist. 我想建立一个网站,用户可以在其中添加信息,例如craigslist。 I want the website user to be able to click a button fill out a form and add another box. 我希望网站用户能够单击一个按钮,填写表格并添加另一个框。 For instance, if there is a three by three grid and the user clicks on the add button, I want a form to appear, them to fill it out and one more box to be permanently added to the grid. 例如,如果有一个三乘三的网格,并且用户单击“添加”按钮,我希望显示一个表单,将其填写,再将一个框永久添加到网格。 Of course I could make it happen with Javascript and JQuery but it isn't permanent. 当然,我可以通过Javascript和JQuery实现它,但是它不是永久的。 Thanks:) 谢谢:)

You can Implement this using server side languages like PHP /Node JS, ASP.net, Java, Ruby or you can use Local Storage of the browser (this gives limited storage capacity ). 您可以使用服务器端语言(例如PHP / Node JS,ASP.net,Java,Ruby)来实现此功能,也可以使用浏览器的本地存储(这会限制存储容量)。 read this for more details. 阅读此以获取更多详细信息。 link 链接

If you don't already know PHP, you will need to learn it for this. 如果您还不了解PHP,则需要为此学习它。 Also, you will need to make sure that you understand how to validate input because letting users add to your database can be a very dangerous thing to do if you don't understand how things like script injection works. 另外,您将需要确保您了解如何验证输入,因为如果您不了解脚本注入之类的工作原理,让用户添加到数据库中可能是一件非常危险的事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM