- bs.Domμ 무μμΈκ° μ€λͺ
- bsJSν ν¬λ‘ μλ
| function add(a, b) { | |
| return a + b; | |
| } | |
| function sub(a, b) { | |
| return a - b; | |
| } | |
| function multi(a, b) { | |
| return a * b; |
| function double(a) { | |
| return add(a, a); | |
| } |
| function quarter(a) { | |
| return div(a, 4); | |
| } |
| function show(msg, containerTag) { | |
| var containerTag = containerTag || 'div'; | |
| var bodyElement = document.getElementsByTagName('body')[0]; | |
| var containerElement = document.createElement(containerTag); | |
| var textNode = document.createTextNode(msg); | |
| containerElement.appendChild(textNode); | |
| bodyElement.appendChild(containerElement); | |
| } |
| var etLanList = { | |
| λ³μ : 'λ³μλ κ°μ μμΉλ₯Ό κΈ°μ΅νλ μ μ₯μμ΄λ€', | |
| 쑰건문 : '쑰건문μ κ°μ λΉκ΅νμ¬ μ€ν νλ¦μ λ³κ²½νλ κΈ°λ₯μ νλ€', | |
| λ°λ³΅λ¬Έ : 'λ°λ³΅λ¬Έμ κ°μ ν¨ν΄μ λ°λ³΅λλ 쑰건μμ μ€ννλ κΈ°λ₯μ νλ€', | |
| λ°°μ΄ : 'λ°°μ΄μ νλμ μ΄λ¦μ 곡μ νλ μ°μλ κ°λ€μ λͺ©λ‘μ΄λ€', | |
| κ°μ²΄ : 'κ°μ²΄λ μ΄λ¦μ 곡μ νλ μ°μλμ§ μμ κ°λ€μ λͺ©λ‘μ΄λ€', | |
| ν¨μ : 'ν¨μλ μ½λμ λ¬Άμμ΄κ³ μ΄λ¦μ νΈμΆνμ¬ μ€ννλ€' | |
| }; | |
| /* |
| let express = require('express'); | |
| let google = require('googleapis'); | |
| let app = express(); | |
| const CLIENT_ID = 'client-id'; | |
| const CLIENT_SECRET = 'client-secret'; | |
| const REDIRECT_URL = 'redirect-url'; | |
| let OAuth2 = google.auth.OAuth2; | |
| let oauth2Client = new OAuth2(CLIENT_ID, CLIENT_SECRET, REDIRECT_URL); |
| var box = $('#box'); | |
| function forwardPos(p) { | |
| return (p+1)+'px'; | |
| } | |
| function backwardPos(p) { | |
| return (p-1)+'px'; | |
| } |
| // https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js | |
| var adjust = 1; | |
| var ui = $('#box'); | |
| var direction = ['up','right','down','left']; | |
| function box() { | |
| var min = 0, max = direction.length; | |
| var selectDirection = Math.floor(Math.random()*(max-min+1)+min); | |
| function WoowaView(options) { | |
| return function() { | |
| this.template = options.template; | |
| this.render = function(list) { | |
| var item = []; | |
| for(var i=0; i<list.length; i++) { | |
| item.push('<li>'+list[i]+'</li>') |