Add function to message page
1, Front-end display of message adding function
You need to introduce the kindeditor editor here. Baidu downloads an imported js file as follows:
And add the following code to the content: (#content corresponds to the id attribute) .editor = K.create('#content',{afterBlur:function(){this.sync();}
});;
is enough, the specific code is as follows:
留言板 留言板
The page is displayed as follows:
##2. Submit request processingNew insertdb.php:
The code is as follows:
query($sql)) { echo "留言成功,3秒后跳转原页面"; }else{ echo "留言失败,3秒后跳转原页面"; } header("Refresh:3;url=message.php");
3, the effect is as shown below:
Can you think about how to use ajax to add functions without refreshing the page? (This will be introduced in the next section)