@app.route('/')
def home():
return render_template('index.html',image_file="static/korea_0.jpg")
<script src="https://code.jquery.com/jquery-3.5.1.js" integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc=" crossorigin="anonymous"></script>
<script>
$(document).ready(function(){
$("#img1").hide();
/*time_0을 클릭했을 때 img1를 보여줌*/
$("#time_0").click(function(){
$("#city_canada").click(function(){
$("#img1").show();
});
});
/*img1를 클릭했을 때 img1을 숨겨줌*/
$("#img1").click(function(){
$("#img1").hide();
});
});
<img id="img1" src="{{url_for('static', filename = 'canada_0.jpg')}}"/>
static에 있는 이미지 파일을 어떻게든 html로 갖고 오려고 별 난리를 했다.
다행이 검색을 좀 잘 해놔서 좋은 코드를 찾을 수 있었는데...
그게 모든걸 해결해 주진 않지....ㅎ
내일은 웹 개발을 마무리 하고 꼭!!!! nohub을 완료 해야한다!!!!