블로그 이미지
자료에 문제가 있을 경우, 확인하는대로 삭제처리 하겠습니다. 즐거운 하루 되시길...
05-05 01:52
Total
Today
Yesterday

카테고리

분류 전체보기 (199)
이야기방 (20)
공부방 (173)
개발노트&관련잡다구니 (6)

<html>
<head>
<title></title>
<script>
function checkFile(file)
{
 alert(file.value);
 file.outerHTML = file.outerHTML;
}
</script>
</head>
<body>

 <form>
   <input type="text" name="txtName"><br>
   <input type="file" name="file"><br>
   <input type="button" value=삭제 onclick="checkFile(file);">
   <input type="button" value=확인 onclick="alert(this.form.upload.value);">

</form>
</body>
</html> 

- 되지만 outerHTML에 대해서 조사를 해야 할 것 같음


Posted by 래채
, |

<html>
<head><title></title>
<script type="text/javascript">
function fncProductFile()
{
 document.Form.txtProductFile.click();
 document.Form.txtProductFileName.value=document.Form.txtProductFile.value;
}

</script>
</head>
<body>
<form name='Form'>
  
<input type='file' name='txtProductFile' size="15"style='cursor:hand;width:5px;filter:alpha(opacity=0);position:absolute;top:10px;left:40px'>
   <input type="Text" style="width:150px;" name="txtProductFileName" class='input' readOnly>
   <img style='cursor:hand' alt="파일찾기" src="/admin/images/bt_list02.gif" align="absMiddle" border="0" onclick="fncProductFile()">
</form>
</body>
</html>

- 테스트 해 본 결과 문제 없었음!

Posted by 래채
, |

window.onerror=function(msg,file,line) {
  alert("오류메세지\t"+msg+"\n"+"파일위치\t"+file+"\n"+"라인번호\t"+line);
  return true;  //true를 return하면 오류메세지를 발생시키지 않음
 }


 - 웹서핑하다가 발견한 코드인데 이걸 추가하면 스크립트 오류가 발생시에 파일명과 라인번호까지 나오는 좀 괜츈한 ... ㅇㅅㅇ;

 - 사용 사이트에서 별로 겠죠? ㅎㅎ
Posted by 래채
, |