>  Q&A  >  본문

내 코드에 어떤 문제가 있나요? 클릭한 후 잘못된 결과라는 메시지가 계속 표시됩니다.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>제목 없는 문서</title>
<script type=" text/ javascript">
function al(){
var x=document.getElementById("d1");
var zhi=x.value;//img.jpg
var hou=zhi.lastIndexOf(".") ;/ /점의 위치 찾기
var k=zhi.search(hou+1);//점의 위치를 ​​한 위치 뒤로 이동
var k=k.toLowerCase;//소문자로 축소
if(k == "jpg " || k == "png" || k == "gif") {
document.write ("성공"); </script>

</head>

<body>
< input type="file" id="d1">
<input type="button" id="d2" value= "업로드하려면 클릭하세요." onclick="al()">
</body>



米萨·毕苏米萨·毕苏1718일 전930

모든 응답(0)나는 대답할 것이다

답장 없음
  • 취소회신하다