Jump to content

Belendor

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Belendor

  1. I see. I will give a few tests then.
  2. Thank you for the replies. I am not trying to get into complex stuff but instead trying to learn what does what really. So this form page, is not for any complex purpose but only self training myself for getting what user writes in textbox and nothing else. That is what I tried to state.
  3. <!DOCTYPE html><html><head><title>JavaScript Basics</title><meta charset="utf-8"><script type="text/javascript">function displayContent(type){if (type == "show"){document.getElementById("container_name").innerHTML = document.getElementById("holder_name").value;}else if (type == "delete"){document.getElementById("container_name").innerHTML = "";document.getElementById("holder_name").value = "";}else{// Do somethingconsole.log("Type is not executable.");}}</script></head><body><div style="margin-top: 40px; margin-left: auto; margin-right: auto; width: 400px; text-align: center;"><input id="holder_name" type="text" name="name"><br><br><div style="margin-left: auto; margin-right: auto; width: 230px;"><input type="submit" value="Gönder" onclick="displayContent('show');" style="width: 100px; float: left;"><input type="submit" value="Sil" onclick="displayContent('delete');" style="margin-left: 30px; width: 100px; float: left;"></div><br><br><div id="container_name"></div></div></body></html> Nope, I don't need this form to return data from somewhere of internet. Think I solved it myself with a bit of help. Any thoughts?
  4. Hello, Basicly, I am so new to HTML5 and trying to learn thanks to the great repository of this site. Right now I am trying to create a simple login/register page. And I want it to do return me the value written in input field as in a (print) perhaps when clicked any of the buttons, there is no arguement with the silliness of the page, buttons here and there...the main reason I did this was to give each button something to test so don't bother with it. But I still can't understand the structure of the HTML5. What should I do? Thanks in advance. <!DOCTYPE html><html><head><title>A BASIC HTML FORM</title><?PHP$username = $_POST['username'];print ($username);?></head><body><center><FORM NAME ="form1" METHOD =" " ACTION = ""><INPUT TYPE = "TEXT" VALUE =" "><INPUT TYPE = "Submit" Name = "Submit1" VALUE = "Login"><input type="Submit" formtarget="_blank" value="Login as a new window"><INPUT TYPE = "Submit" Name = "Submit2" VALUsE = "Register"></FORM></center></body></html><form action="demo_form.asp"> First name: <input type="text" name="fname"><br> Last name: <input type="text" name="lname"><br> <input type="submit" value="Submit"></form>
×
×
  • Create New...