Cannot post span value by document.form.submit

I'm writing a form and use document.form.submit() to post value, and I hope I can use x = http.formvalue("") to get the value well. But I found if I submit <span> value then I'll get null, if I replace <span> to <input> then I can get the value well, can anyone help me get the value only use <span>? thx!


<form id="form1" name="form1" method="post">
  <ul class="formUl">
      <span class="clm01">Phone:</span>
      <span class="clm02" id="phone" name="phone"></span>
  <a class="submitBtn" href="#" onclick="apply()">Apply</a>


function apply() {



span is not a form element. Form elements are inputs, selects, radios, textareas, etc. That is why it works when you change it to an input.


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us Javascript

©2020 All rights reserved.