Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8451365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:13:10+00:00 2026-06-10T11:13:10+00:00

The Code: var i=0,j=0; var t1= new Array(); function createtext(){ i++; t1[i]=document.createElement(‘input’); t1[i].type=’text’; t1[i].name=’text’+i;

  • 0

The Code:

var i=0,j=0;

var t1= new Array();
function createtext(){

    i++;

    t1[i]=document.createElement('input');

    t1[i].type='text';

    t1[i].name='text'+i;

    t1[i].value = "hello"+i;

    t1[i].size = 10;

    document.forms[0].appendChild(t1[i]);

    var mybr=document.createElement("<br>");

    document.appendChild(mybr);

}

The Form:

<form action="" method="get" name="f1">

    <input name="b1" type="button" onClick="createtext()" value="+">

</form>

When Clicking the “+” button the textbox will generate downward not to the side of each textbox.. then each textbox has a “REMOVE” link in thier side.. when the “REMOVE” was click the textbox will remove.. pls help me.

------------------------------------------------
(+) <-imagine this is the button

[SAMPLETEXTBOX1] REMOVE <-imagine a textbox1 with remove link beside it

[SAMPLETEXTBOX2] REMOVE <-imagine a textbox2 with remove link beside it

[SAMPLETEXTBOX1] REMOVE <-imagine a textbox3 with remove link beside it
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:13:12+00:00Added an answer on June 10, 2026 at 11:13 am

    You should append to the form, not the document, also use document.createElement("br") instead of document.createElement("<br>").

    var mybr=document.createElement("br");
    document.forms[0].appendChild(mybr);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why does this code always return 0? var possibleMatches = new Array(); $.getJSON('getInformation.php', function(data)
See this code: var MyObject = new function() { this.tos = new Array(); this.show
Here is my code: var var_ids = new Array(); var i = 0; jQuery(select).each(function()
The following snipped of code: var theAdNets = new Array(); function populateAdNetList() { }
I have the following code: var ids = new Array(5); $(function(){ html5sql.process(sql, function(transaction, results,
I have this code: var myArray = new Array(); var counter = 0; function
I have an array created with this code: var widthRange = new Array(); widthRange[46]
I have this code: try { var _o, _l, i, _d = new Array(),
Code example: <script> var data = new Array(); data[0] = 'hi'; data[1] = 'bye';
Here is some testing code: <script> var movieList = new Array(); var friendList= ;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.