view.skin.php 제일 아래에 아래 코드 추가하시면됩니다.
[code]
<script>
$(document).ready(function () {
$("head").append('<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.js">');
$("#bo_v_con").prepend('<div id="qr-code-view"></div>');
setTimeout(function() {
var qrcode = new QRCode(document.getElementById("qr-code-view"), {
text: window.location.href,
width: 100,
height: 100,
colorDark : "#000",
colorLight : "#fff",
correctLevel :1
});
}, 100);
})
</script>
[/code]
댓글 6개
css 추가 버전 AI..

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QR 코드 생성기</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
}
#container {
background-color: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
text-align: center;
}
input {
padding: 10px;
margin: 10px 0;
width: 80%;
max-width: 300px;
border: 1px solid #ccc;
border-radius: 5px;
}
button {
padding: 10px 20px;
border: none;
border-radius: 5px;
background-color: #007bff;
color: white;
font-size: 16px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
#qr-code-view {
margin-top: 20px;
}
</style>
<div id="container">
<label for="user-input">홈페이지 주소 입력:</label>
<input type="text" id="user-input" placeholder="Enter text here">
<button onclick="generateQRCode()">QR 코드 생성</button>
<div id="qr-code-view"></div>
</div>
<script>
function generateQRCode() {
var inputText = document.getElementById("user-input").value;
if (inputText) {
document.getElementById("qr-code-view").innerHTML = "";
var qrcode = new QRCode(document.getElementById("qr-code-view"), {
text: inputText,
width: 150,
height: 150,
colorDark: "#000",
colorLight: "#fff",
correctLevel: QRCode.CorrectLevel.H
});
} else {
alert("Please enter a value to generate the QR code.");
}
}
</script>
</body>
</html>
게시글 목록
| 번호 | 제목 |
|---|---|
| 23966 | |
| 23963 | |
| 23953 | |
| 23949 | |
| 23938 | |
| 23935 | |
| 23933 | |
| 23928 | |
| 23919 | |
| 23918 | |
| 23917 | |
| 23910 | |
| 23902 | |
| 23901 | |
| 23897 | |
| 23894 | |
| 23893 | |
| 23891 | |
| 23885 | |
| 23872 | |
| 23870 | |
| 23862 | |
| 23859 | |
| 23853 | |
| 23845 | |
| 23838 | |
| 23827 | |
| 23819 | |
| 23805 | |
| 23801 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기