2010-05-28 1 views
0

조금 잃어 버렸습니다. 내가 달성하고자하는 것은 :형태로 PHP와 자바 스크립트를 사용합니다.

  • 내 자신의 사용자 정의 버튼 등
  • 변화 onMouseover와 '
  • 는 PHP는 서버 측 코드

에 정보를 게시가 크기

  • 의 유지 무엇 내가 누락되었습니다 :

    • 포스트 - 나는 & PHP는
    • 됩니다 단추 크기 JS 결합하는 방법을 알아낼 수 - 내 코드는 원래 버튼의 크기를 설정하지만, 롤오버 후는

    코드 변경 :

    <html> 
    <head> 
    </head> 
    <body> 
    
        <script> 
         function form_on_click(frm) 
         { 
          document.buttonMore.src='bottom_more_click.JPG'; 
          frm.submit(); 
         } 
        </script> 
    
        <div style="position: absolute; left: 120px; top: 90px; background-image: url(myBackgroundPicture.jpg); 
        background-repeat:no-repeat; width: 800px; height: 280px; padding: 15px;"> 
    
         <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">    
          <input type="text" name="whatever" size= "55" height="100" lang="en" dir="ltr" style="margin-top: 188px; margin-left: 95px; height: 20px; background-color: transparent; border:none; 
          color: #FFFFFF; font-family: Verdana; font-weight: none; font-size: 18px;"> 
    
          <a onmouseover="document.buttonMore.src='bottom_more_hover.JPG'" 
          onmouseout="document.buttonMore.src='bottom_more_reg.JPG'" 
          onmousedown= "form_on_click(this.form) this.form.submit()" 
          onmouseup="document.buttonMore.src='bottom_more_hover.JPG'"> 
    
          <img src="bottom_more_reg.jpg" name="buttonMore" height="30" width="173" border="0" alt="MORE!" style="margin-bottom:-10px; margin-left: 15px; height: 30px; width: 100px;"> 
    
    
          </a> 
         </form> 
    
    
        </div> 
    
    </body> 
    

  • 답변

    0

    업데이트 :

    오, 확실히 .. 실례합니다. 너는 완전히 옳다. 나는 내 머리가 어디 있는지 모른다.

    다른 시도 뭔가이 줄을 다시

    onmousedown= "form_on_click(this.form) this.form.submit()" 
    

    를 제거하고

    href="javascript:form_on_click(this.form);" 
    

    당신은을 사용하지 않는 이유는 단지 제안에 의해 교체 ...

    <input type="button" /> 
    

    ... 그런 다음 CSS에서 사용자 정의 하시겠습니까? 버튼의 크기에 대한

    편집

    , 그 JPEG 파일은 동일한 크기입니까?

    +0

    무엇을 의미합니까? 기본 제출 버튼이 아니라면 내 것이고 클릭은 아무 것도하지 않습니다. 네가 한 것처럼 내가 발언을해도 ... – AYBABTU

    0

    가장 쉬운 방법은 JQuery를 사용하는 것입니다. JQuery의 몇 가지 간단한 단계만으로 원하는 모든 작업을 수행 할 수 있습니다. 마우스 오버/아웃은 그것과 톤을 더 제출합니다.

    나는 JQuery와 사랑에 빠졌습니다 ...