$ ('#id').text('text') : text 변경
$ ('#id').append('tag') : html에 요소 추가
$ ('#id').empty() : empty
$ ('#id').toggle() : display on off
$ ('#id').val() : input value return
$ (document).ready(function () {}) : 페이지 열릴 때 함수 실행
https://www.google.com/ search? q=검색어
(서버의위치) (창구 이름) (데이터)
const firebaseConfig = {
apiKey: "",
authDomain: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: "",
measurementId: ""
};
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
$("#postingbtn").click(async function () {
let doc = { 'name': 'bob', 'age': 30 };
await addDoc(collection(db, "name"), doc); //컬렉션에 name의 그룹 추가되고 doc필드가 들어감
});
let docs = await getDocs(collection(db, "name")); //name콜렉션을 불러와 docs자료형에 넣음
docs.forEach((doc) => {
let row = doc.data(); //반드시 doc.data();를 해서 딕셔너리 형으로 변경해야함
console.log(row);
});
https://colab.research.google.com
웹 파이썬 실행 도구
import requests
from bs4 import BeautifulSoup
URL = "https://bit.ly/web-movie"
headers = {'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36'}
data = requests.get(URL, headers=headers)
soup = BeautifulSoup(data.content, 'html.parser')
title=soup.select_one('개발자 도구에서 copy>copy selector')
print(title)
<input type="text" class="form-control" id="foodTitle" placeholder="제목">
<laber for="foodTitle">음식명</label> //label for= 은 <input>과 같은 셀프 클로징 태그에 용도를 명확하게 보여줄 때 사용합니다.