2015-02-04 1 views
-2

내가이 웹 페이지I 버튼 아무것도 클릭하지 않을 때 웹 페이지에 자바 스크립트

<input id="show" style="display: inline;" type="button" onclick="document.getElementById('hash').value = hex_sooml('M77LNALA');" value="Show Password"> 

<input style="display: inline;" id="hash" size="50" type="text"> 

<script type="text/javascript"> 
function hex_soom1(pass) 
{ 
return pass; 
} 
</script> 

에게이 작동하지 발생합니다. 왜?

+4

'hex_soom1'는 hex_sooml''와 동일하지 않습니다. 또한 Javascript 콘솔에서 오류를 확인하십시오. – deceze

+0

Aaaaah !! 알았어 .... 고마워 !!! –

답변

1

나는 함수 이름에서 _soom1 제거하고이 노력하고 있습니다 : http://jsfiddle.net/g4dboz12/

<input id="show" style="display: inline;" type="button" onclick="document.getElementById('hash').value = hex('M77LNALA');" value="Show Password"> 

    <input style="display: inline;" id="hash" size="50" type="text"> 

    <script type="text/javascript"> 
     function hex(pass) { 
      return pass; 
     } 
    </script> 
관련 문제