www.webdeveloper.com
Results 1 to 4 of 4

Thread: lacking code...need idea.!!!

  1. #1
    Join Date
    Feb 2014
    Posts
    6

    lacking code...need idea.!!!

    1.jpg


    <html>

    <input type="button" value="Click to twist the word"onClick="me()">


    <input type="text" id="word">
    <div id="dota">
    </div>


    <script>

    function random(){
    return (Math.round(Math.random())-0.5); }

    function me() {

    var inputStr = document.getElementById("word").value;
    var inputArr = inputStr.split('')
    inputArr.sort(random);
    var outputStr = "";

    for (var i=0; i<inputArr.length; i++){
    outputStr += inputArr[i]; }

    document.getElementById("dota").innerHTML= outputStr;
    }

    </script>

    </html>

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,120
    pls be kind and explain your issue, any errors you have seen etc. It is rather rude to let the volunteers to figure out what your code is doing and what you expect it to do.
    Please elaborate on your issue.
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  3. #3
    Join Date
    Feb 2014
    Posts
    6

    pic.attach

    view the pic. that i attach... thats what i mean the lacking code

  4. #4
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,346
    1. Please use the appropriate code tags and wrap code elements in them, it makes life easier.
    2. Please state the problem and write the problem as text, not as an image, it makes life easier
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles