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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:30:06+00:00 2026-06-09T03:30:06+00:00

for example i have a input, anchor tags, divident or any element that a

  • 0

for example i have a input, anchor tags, divident or any element that a value could be possible. how to search inside a element like to see if there is a
attribute inside of it or any value as i desire and then put it in a conditional statement like if and elseif statement and check if the selector has a
inside and if there is then alert yes else alert no or in php, echo yes if there a
inside, else echo yes.

I tried this. assume i have a textarea

var isFound = $("#apostform textarea").val().search("<br>");
alert ('there is');

question: is the alert box is still be executed even if we found no
inside of the specified text area?

I need this to be done in javascript, jquery, and in php. thank you in advance.

  • 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-09T03:30:08+00:00Added an answer on June 9, 2026 at 3:30 am

    DOM objects have properties, to search all properties for particular value you can use a for..in loop:

    for (var prop in element) {
    
      if ( element[prop] == 'some value' ) {
    
        // do stuff
    
      } else {
    
        // do other stuff
    
      }
    }
    

    or if you know the property you’re after and just want to see if it has a truthy value:

    if (element.property) {
      // do stuff
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example I have a css style like this : input.validation-passed {border: 1px solid
for example I have the following: <div class=both> <textarea data-id=1 name=t1>Value 1</textarea> <input type=checkbox
I would like to learn about HTML forms. For example, I have 2 input
I have generated inputs with price values. Example: <input type=text value=59,00/> Now I should
For example, i have checkboxes: <input type='checkbox' name='fruit' value='apple'> Apple <input type='checkbox' name='fruit' value='orange'>
I have an input text: <input name="Email" type="text" id="Email" value="email@abc.example" /> I want to
I have input text that can be long HTML text with tags and so
I have anchor tag and input tag <a href=example.com>Go to Example.com</a> and &lt;a href=example.com&gt;Go
I have an input string that's generated as in following example: string.Format(Document {0}, was
Is it possible to simulate user input in android ? For example to have

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.