0
프로젝트에 wysiwyg 플러그인 (http://code.google.com/p/jwysiwyg/)을 사용하고 있는데 textarea가 비어 있거나 양식을 제출하기 전에 경고를 사용자에게 줄 수는 없지만이 플러그인을 사용하면 iframe을 만들고 얻을 수 없습니다. 아이디 #testojquery wysiwyg plugin의 textarea에 액세스하는 방법은 무엇입니까?
<p><div class="wysiwyg" style="width: 896px;">
<div style="clear: both;"><!-- --></div>
<iframe tabindex="0" id="testoIFrame" style="min-height: 130px; width: 888px;" src="javascript:false;" frameborder="0">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body style="margin: 0px; font-family: Arial,Helvetica,sans-serif; font-size: 12px;">
your text here
</body>
</html>
</iframe>
</div>
<textarea style="display: none;" id="testo" name="testo" rows="8">
</textarea></p>
텍스트 영역에 텍스트 영역을 대체
이는 HTML 플러그인에 의해 생성되어 표시되지 않습니다. iframe에 텍스트가 없으면 content div에 클래스를 추가합니다.
$ ('# testo'). addClass ('border'); 나는이 일을 할 생각
#testo가 비어 있고 클래스가 추가되지 않은 경우에도 양식이 제출됩니다. – antonio
실제 양식과 같은 좀 더 많은 코드를 보여줄 수 있습니까? 또한 아약스 코드를 사용하여 양식을 제출하면 알려주세요. –