可以說這是我的HTML表單定義觸發一個jQuery文件的jquery.js裏面的函數:如何從一個html <form>
<form id="feedback" action="" enctype="multipart/form-data" method="post">
jQuery的文件頭標記定義:
<script type="text/javascript" src="js/ajaxarchive.js"></script>
我還建立了一個輸入字段中的HTML DIV作爲一個按鈕:
<div id ="button" class="button">
<input type="submit" name="submit" id="submit" value="Enviar" />
</div>
我有JavaScr在我的index.html中的ipt代碼,我更願意讓代碼在index.htm之外驗證我的表單。我可以在這樣的句子加我的功能 (但我寧願想從外部文件調用我的函數):
if ($li_e.attr('class')==='cc_content_13'){
/*here I try to recieve code from the ajaxarchive.js inside functions*/
}
我爲了如何定義的功能也ajaxarchive.js裏面的東西一樣
var formData = $('form').serialize();
submitForm(formData); <-- This is the name of the function
Whaaaat?你能花時間讓這個問題可讀嗎? – Blender