Skip to content

Commit

Permalink
add Commented-Out Code
Browse files Browse the repository at this point in the history
  • Loading branch information
AyaIsLearning committed Jun 16, 2019
1 parent 9d7e9fe commit 23143c5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion front_end/js/personalinfo.js
Expand Up @@ -4,6 +4,7 @@ var role;
var formData;
var ajax_success;

//替换符号,避免被插入恶意JS
function html2Escape(sHtml) {
return sHtml.replace(/[<>&"]/g,function(c){
return {'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];
Expand All @@ -14,6 +15,7 @@ function reset(){
window.setTimeout("location.href='./safe.html'", 0);
}

//设置安全问题
function setQuestion(){
if($.cookie("username")==undefined){
alert("未登录,无法设置安全问题");
Expand Down Expand Up @@ -58,6 +60,8 @@ function setQuestion(){
}
}


//获取用户信息
function getUserData(name){
console.log(name);
ajax_success=$.ajax({
Expand Down Expand Up @@ -107,6 +111,8 @@ function getUserData(name){
});
}


//修改信息
function modifier() {
if($("#name").text()!=$.cookie("username")){
alert("不能修改他人信息!");
Expand Down Expand Up @@ -173,7 +179,7 @@ function modifier() {
});
}


//用于生成在个人信息内的评价
function genComment(data){

console.log(data);
Expand Down

0 comments on commit 23143c5

Please sign in to comment.