이 블로그 검색

2023년 7월 22일 토요일

How to Make Requests with Chrome Developer Tools

How to Make Requests

  1. Open the developer tools on the web page (for Chrome, press F12).
  2. Go to the console.
  3. Enter the JavaScript function, for example: goMenu('1018','admin');.
  4. Press Enter to execute the function.

Example

JavaScript Code

function user_auth_check(needLevel, userLevel){

	if(needLevel == userLevel){
		return true;
	}else{
		return false;
	}
}

function goMenu(code, userLevel){
	switch (code){
		case '1018':
			if(user_auth_check('admin',userLevel)){
				location.href="./fire_nuclear_Attack.php";
				break;
			}else{
				alert('You do not have permission.');
				break;
			}
		case '1129':
			location.href="./logout.php";
			break;
		default:
			alert('This menu does not exist.');
	}
}

Webpage Button Code

<a class="btn btn-lg btn-danger" href="#" role="button" onclick="goMenu('1018','')">Fire</a>

댓글 없음:

댓글 쓰기

Logic Gate Truth Tables & Definitions

Logic Gate Truth Tables Java Code !A // NOT A&B // AND ~(A&B) // NAND A|B // OR ~(A|B) // XOR A^B // XOR ~(A^B) // XNOR ~A // Inve...