HTML의 텍스트 필드를 변경하면 양식을 제출하려고합니다.텍스트 형식 필드 제출 OnChange
<form name="editAgendaItem19" id="editAgendaItem19" method="post" action="./?module=meetings&preload=edit&function=editAgendaItem&agendaitem=19">
<table width="100%" border=0>
<tr><td width="20px">1</td><td><input type="text" value="" name="agendaItemTitle19" onChange="javascript:document.forms['editAgendaItem19'].submit()" /></td>
...
로 평가
echo("<form name=\"editAgendaItem" . $this->Id . "\" id=\"editAgendaItem" . $this->Id . "\" method=\"post\" action=\"./?module=meetings&preload=edit&function=editAgendaItem&agendaitem=" . $this->Id . "\">\n");
echo("<table width=\"100%\" border=0>\n");
echo("<tr><td width=\"20px\">" . $this->Index . "</td><td><input type=\"text\" value=\"" . $this->Title . "\" name=\"agendaItemTitle" . $this->Id . "\" onChange=\"javascript:document.forms['editAgendaItem" . $this->Id . "'].submit();\" />");
echo("</td>\n");
...
하지만 더 중요한 것은
<form name="editAgendaItem19" id="editAgendaItem19" method="post" action="...">
<input type="text" value="" name="agendaItemTitle19" onChange="javascript:document.forms['editAgendaItem19'].submit()" />
...
- 결국 태그로 종료 : 현재, 내 코드는 다음과 같이 보인다. 내 문제는 필드를 수정하고 포커스를 놓으면 양식이 제출되지 않는다는 것입니다.
미리 도움을 청하십시오.
편집 : 나는 또한 인라인 코드 대신 OnChange 이벤트에이 방법을 사용하려고했습니다
:
<script type="text/javascript">
function submitForm(FormName)
{
document.forms[FormName].submit();
}
</script>
편집 :
다음 코드를 사용하는 제안을 툭 :<script>
$(document).ready(function(){
$('#agendaItemTitle24').live('blur',function()
$('#editAgendaItem24').submit();
});
});
</script>
내 머리 속에는
<form name="editAgendaItem24" id="editAgendaItem24" method="post" action="...">
<input type="text" value="" name="agendaItemTitle24" id="agendaItemTitle24" />
</form>
내 콘텐츠. 아직 주사위가 없습니다.
당신이 당신의 자바 스크립트 콘솔에서 오류 또는 경고를 받고 있습니까? 그렇다면 여기에 게시 할 수 있습니까? – octern
나는 옥타 네가 아니야. – DigitalJedi805
아니요, 저는 8 각형입니다. 그래서 "- octern"이 내 의견 끝에 나타납니다. – octern