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

  • SEARCH
  • Home
  • 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 8593019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:53:29+00:00 2026-06-11T23:53:29+00:00

my snippet which am developing has four inner htmls with javascript now my question

  • 0

my snippet which am developing has four inner htmls with javascript now my question is can we get all these data from all and add(if integer) them or concatinate(if string) and dispaly in another div tag

<script>
 document.getElementById('one').innerHTML = 10;
</script>    

<script>
 document.getElementById('one').innerHTML = 20;
</script>

<div id="one">    
</div>

<div id="two">    
</div>

<div id="three">
    now here i want the sum of the both one and two
</div>

anyone help me is it possible or not if yes how to do 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-11T23:53:30+00:00Added an answer on June 11, 2026 at 11:53 pm

    This would set the <div id="three"> innerHTML to sum of <div id="one"> and <div id="two">. If you need to just concatenate (you mention both concatenate and sum in your question, so it’s not clear which one you actually need) two innerHTML strings then remove the parseInt(); functions.

    <script>
    document.getElementById('three').innerHTML = parseInt(document.getElementById('one').innerHTML) + parseInt(document.getElementById('two').innerHTML);
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello this is code snippet which i get from Jquery Ajax based search I
In my project, I have created a code snippet which can be copied and
I'm currently developing an app which uses the built-in Camera. I call this snippet
I am developing a app in android .... which need a code snippet to
I am developing an iphone app, which sends/receives data to audio/headphone jack of iphone.
I am developing an application which can launch number of other applications. I can
I am developing a SQL script in SQL Developer which will obfuscate personal data
In this thread I found a JavaScript code snippet which I want to use.
I have the following very simple code snippet which is loaded from a separate
I am wondering if there is a simple snippet which converts links of any

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.