-1
파일 업 로더를 열려면 내 이미지 onclick을 가져 오려고하는데 아무 것도 작동하지 않습니다.이미지를 클릭하고 파일 업로드 열기
HTML :
<a href="#">
<figure class="profile-picture" id="profile-picture">
</figure>
</a>
CSS :
figure.profile-picture {
background-position: center center;
background-image: url(/img/QNdefualt.jpg);
background-size: cover;
border: 5px #efefef solid;
border-radius: 50%;
bottom: -50px;
box-shadow: inset 1px 1px 3px rgba(0,0,0,0.2), 1px 1px 4px gba(0,0,0,0.3);
height: 148px;
left: 150px;
position: absolute;
width: 148px;
z-index: 3;
}
.profile-picture:hover {
background-image: url(/img/defualt-hover.png);
background-size: cover;
}
내가 해봤 onclicks 그러나 나는 점점 오류를 유지한다. 도와주세요.
봐 여기 : 당신의 onclick 코드가 어디 http://stackoverflow.com/questions/11412284/upload-file-with-one-button입니다 –
? 또한 브라우저는 파일 업로드를 열기 위해 file 유형의 입력 요소가 필요합니다. – ATerry
예 ik와 그것이 작동하지 않아서 삭제했습니다. getElementById를 사용하려고했습니다. –