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 551565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:24:26+00:00 2026-05-13T11:24:26+00:00

I have specification for products in text doc that I need to transfer into

  • 0

I have specification for products in text doc that I need to transfer into HTML.

Might sound a bit strange but but what I’m trying to do is replace paragraph tags into two table columns, so this:

<p>Load (kg):5,000, 10,000, 20,000, 30,000</p>
<p>Excitation  Voltage: 10vdc recommended, 20vdc maximum</p>

into this

 <tr>
    <td>Load (kg)</td>
    <td>5,000, 10,000, 20,000, 30,000</td>
  </tr>

 <tr>
    <td>Excitation  Voltage</td>
    <td>10vdc recommended, 20vdc maximum</td>
  </tr>

To replace paragraph tag I’ve used function bellow

$("p").each(function () {
      $(this).replaceWith("<td>" + $(this).text() + '</td>');
    });

So I have to hook up to ‘ : ‘ to close and close and open another table data (column)

Any help much appreciated

Thank you in advance

Dom

  • 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-05-13T11:24:27+00:00Added an answer on May 13, 2026 at 11:24 am

    This is specific to your particular example and assumes well-conditioned data. If you can have multiple colons in the text, you’ll need to adjust use the limit argument of split to limit it to 2 results.

    $("p").each(function () {
      var text = $(this).text().split(':');
      $(this).replaceWith("<td>" + text[0] + '</td><td>' + text[1] + '</td>');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a function specification that states it that should evaluate a polynomial function
Have gone through hibernate api specification on FlushMode but didn't get the exact difference.
It looks like POSIXlt allows millisecond precision specification, but I have a problem when
Note : I have tried using unserialize function but it say that first argument
I have a table that contain products with their specifications.i created a sample of
I just downloaded from: http://java.sun.com/products/servlet/download.html the Java(TM) Servlet API Specification Interface Classes 2.3 Inside
Using Flex and Bison, I have a grammar specification for a boolean query language,
I am planning to build compiler for Requirement Specification Language. I have come up
Have a look at this picture alt text http://www.abbeylegal.com/downloads/2009-04-01/web%20part%20top%20line.jpg Does anyone know what css
Have a SomeLib.pro file that contains: CONFIG += debug TEMPLATE = lib TARGET =

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.