jueves, 18 de octubre de 2012

javascript buscar dentro de un string instring instr

<script>

function inString(dato1, dato2)
{
    tam1=dato1.length;
    tam2=dato2.length;
    esta=false;
   
    if (tam1<=tam2)
    {
        for (i=0;i<(tam2);i++)
        {
            if ((tam2-i)>(tam1-1))
            {
                aux="";
               
                for (j=0;j<tam1;j++)
                {
                    aux=aux+((dato2[j+i]));                   
                }

                if (aux==dato1)
                    esta=true;
            }
        }
       
        return esta;
    }
}


if (inString("holaa","esto es hola y tu 123456789"))
    document.write("si esta");
else
    document.write("no esta");


</script>





.

35 comentarios:

Anónimo dijo...
Este comentario ha sido eliminado por un administrador del blog.
Anónimo dijo...
Este comentario ha sido eliminado por un administrador del blog.
Anónimo dijo...

I love what you guys are usually up too. This
kind of clever work and reporting! Keep up the good works guys I've incorporated you guys to my own blogroll.

Here is my web page :: Exercises for Vertical Leap

Anónimo dijo...

Nice post. I was checking constantly this blog and I am impressed!
Very useful info particularly the last part :) I care for such
information much. I was seeking this particular information
for a very long time. Thank you and good luck.

My webpage; vertical jump workouts

Anónimo dijo...

Hi, i read your blog occasionally and i own a similar one and i was just curious if you get
a lot of spam remarks? If so how do you reduce it,
any plugin or anything you can recommend? I get so much lately it's driving me crazy so any assistance is very much appreciated.

Here is my web page; www.mypatroncard.com

Anónimo dijo...

After I initially commented I appear to have clicked on
the -Notify me when new comments are added- checkbox and now
each time a comment is added I receive four emails with the
same comment. Is there a means you are able to remove me from that service?

Cheers!

Stop by my web page ... http://www.Wiki.chargerbots.info/DarlajsBabinud

Anónimo dijo...

I'm not sure exactly why but this web site is loading extremely slow for me. Is anyone else having this problem or is it a problem on my end? I'll check back later
on and see if the problem still exists.

My homepage - vacation bora bora all inclusive package

Anónimo dijo...

Way cool! Some extremely valid points! I appreciate you penning this post and the rest of the site is also
really good.

Stop by my web page workouts to improve vertical leap

Anónimo dijo...

It's remarkable in favor of me to have a web page, which is valuable in favor of my knowledge. thanks admin

My blog ... Http://www.nsppf.org.uk/

Anónimo dijo...

Good day! This is my 1st comment here so I just wanted to give a quick shout out and
tell you I truly enjoy reading through your posts.
Can you recommend any other blogs/websites/forums
that cover the same subjects? Thanks!

my blog post :: vertical jump exercises

Anónimo dijo...

Wow, fantastic blog format! How lengthy
have you been running a blog for? you make running a blog look easy.
The whole look of your site is great, let alone the content!


Have a look at my weblog; fitness quest elliptical eclipse

Anónimo dijo...

Wow, fantastic blog format! How lengthy have you been running a blog for?
you make running a blog look easy. The whole look of
your site is great, let alone the content!

Also visit my web blog ... fitness quest elliptical eclipse

Anónimo dijo...

I've been exploring for a little bit for any high quality articles or blog posts in this sort of area . Exploring in Yahoo I finally stumbled upon this website. Studying this info So i'm glad to show that I've an incredibly good uncanny feeling I discovered just what I needed. I most certainly will make certain to do not put out of your mind this web site and give it a look regularly.

Feel free to surf to my web-site ... vertical leap exercises

Anónimo dijo...

My brother suggested I might like this blog. He used to be entirely right.
This publish truly made my day. You cann't consider simply how a lot time I had spent for this info! Thanks!

Look at my web-site Whatiscommunitycollege.com

Anónimo dijo...

Have you ever thought about adding a little bit more than just your
articles? I mean, what you say is important and all.
However just imagine if you added some great pictures
or videos to give your posts more, "pop"! Your content is excellent
but with images and clips, this site could undeniably be one of the greatest in its field.
Great blog!

Feel free to surf to my web site ... workouts to jump higher

Anónimo dijo...

whoah this weblog is wonderful i like reading your posts.
Stay up the great work! You already know, lots of people
are looking around for this information, you can aid them
greatly.

Feel free to surf to my blog - Http://hook2It.com

Anónimo dijo...

Wow, that's what I was exploring for, what a information! existing here at this web site, thanks admin of this web page.

Here is my web page: http://situsplus.com/

Anónimo dijo...

Thank you for the good writeup. It in fact was a amusement account it.
Look advanced to more added agreeable from you! By the way, how
can we communicate?

Here is my site ... Http://Www.Covsearch.Co.Uk/

Anónimo dijo...

Howdy would you mind stating which blog platform you're working with? I'm planning to start my own blog soon but I'm having a tough time selecting between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I'm looking for something completely unique.

P.S Sorry for being off-topic but I had to ask!


Feel free to surf to my page - exercises to improve vertical jump

Anónimo dijo...

Hey there! Quick question that's completely off topic. Do you know how to make your site mobile friendly? My blog looks weird when viewing from my iphone 4. I'm trying to find a
template or plugin that might be able to correct this issue.

If you have any suggestions, please share. Cheers!


Also visit my web page http://Motion.io

Anónimo dijo...

She also wanted to know if these work better or sooner than the pregnancy tests that you can get from any pHarmacy or grocery store.
Chinese Fertility Massage - Many women are getting pregnant just by learning how to perform the Chinese fertility massage techniques.
http://pregnancyhelper.in/fertility-statistics.html

Anónimo dijo...

I like what you guys tend to be up too. This type of clever work and reporting!
Keep up the superb works guys I've you guys to my blogroll.

Also visit my website; vertical Jump program

Anónimo dijo...

Heya! I understand this is somewhat off-topic however I had to
ask. Does operating a well-established website such as yours take a lot of work?

I'm brand new to blogging however I do write in my diary daily. I'd like
to start a blog so I will be able to share my personal
experience and views online. Please let me know if you have any kind of recommendations or
tips for new aspiring blog owners. Thankyou!

Also visit my web page: ayat.tima.org.tw

Anónimo dijo...

I'm extremely impressed with your writing skills and also with the layout on your blog. Is this a paid theme or did you customize it yourself? Anyway keep up the nice quality writing, it is rare to see a nice blog like this one these days.

Here is my web page; exercises to improve vertical jump

Anónimo dijo...

My brother suggested I might like this blog. He was totally right.

This post truly made my day. You can not imagine simply how much time I had spent for this information!
Thanks!

Here is my website http://www.shamolsaya.com/index.php?do=/blog/17253/some-good-suggested-exercises-to-use-to-increase-your-vertical

Anónimo dijo...

Excellent way of explaining, and nice article to obtain
data about my presentation focus, which i am going to deliver in university.


My web page; www.mathieu.ro

Anónimo dijo...

Hi, i believe that i noticed you visited my
site thus i came to return the favor?.I am attempting to in finding issues to
enhance my web site!I guess its adequate to use some of your ideas!
!

My web site workouts to increase vertical leap

Anónimo dijo...

You actually make it seem so easy along with your presentation but I
in finding this topic to be really something that I think I might never understand.
It sort of feels too complex and very extensive for me.
I'm looking ahead for your subsequent put up, I'll attempt to get
the cling of it!

Feel free to visit my site ... exercises for vertical leap

Anónimo dijo...

Wonderful items from you, man. I have remember your stuff prior to
and you're simply extremely great. I really like what you've received here, really like what you're stating and the best way wherein you say it. You are making it enjoyable and you continue to take care of to keep it smart. I can not wait to learn far more from you. This is really a great web site.

Feel free to surf to my web blog ... workouts for vertical

Anónimo dijo...

I don't know if it's just me or if perhaps everyone else experiencing problems with your site.
It seems like some of the written text on your content are
running off the screen. Can somebody else please provide feedback and let me know if this is happening to them too?
This may be a problem with my internet browser because I've had this happen previously. Appreciate it

Also visit my site ... exercises to improve vertical jump

Anónimo dijo...

It's awesome in favor of me to have a web site, which is beneficial for my know-how. thanks admin

Stop by my blog ... workouts for vertical jump

Anónimo dijo...

As the admin of this web site is working, no uncertainty very quickly it will be
renowned, due to its quality contents.

Feel free to surf to my site: indabronx.com

Anónimo dijo...

Incredible! This blog looks exactly like my old one!
It's on a completely different topic but it has pretty much the same page layout and design. Outstanding choice of colors!

my homepage; isaacemore.co.uk

Anónimo dijo...

It's fantastic that you are getting ideas from this paragraph as well as from our dialogue made at this time.

Have a look at my webpage www.vanastree.org

Anónimo dijo...

I am really happy to read this webpage posts which consists of tons of useful facts, thanks for providing such
statistics.

Also visit my webpage; breakfast lasagna recipe