views:

36

answers:

3

i have this code

<tr>
                                <td  width="300">
                                        <label for="tag">Model</label>
                                </td>
                                        <td>
                                                <td width="10">:</td>
                                        </td>
                                <td>
                                        <td>
                                                <td width="450" align="left">
                                                <input type="text" id="tags1" name="model">
                                                </td>
                                        </td>
                                </td>
                        </tr>

if i type inside textfield "E" i want inside another cell show like:

<tr>
       <td><label><h6>this version <input type.......show E>
                  <br>87.5-108.0</br></h6></label>
        </td>
</tr>

but if type "J" will show:

<tr>
       <td><label><h6>this version <input type......show J>
                  <br>87.5-107.9</br></h6></label>
        </td>
</tr>

what's code that can make it works after press enter?

A: 

Can you use jQuery? What language are you using? Could you also please explain the desired outcome a little more?

griegs
A: 

I do not understand what you what to show and where, but you could try this code for the first part when you press enter:

$("#tags1").keyup(function(e) {
    if(e.keyCode == 13) {
        var input = $("#tags1").val();
        switch(input)
        {
            case "E":
                // show E
            break;
            case "J":
                // show J
            break;
    }
});
ungarida
i'll modify and combine u're answer n jian lin
klox
A: 

you can follow this sample:

<table><tr><td><input type="text" id="aTextInput"></td><td id="theValue"></td></tr></table>

<script>

    document.getElementById("aTextInput").onchange = function(event) {
        //console.log(event)
        //console.log(document.getElementById("aTextInput").value)
        if (document.getElementById("aTextInput").value == "E")
            document.getElementById("theValue").innerHTML = "87.5-108.0";
        else if (document.getElementById("aTextInput").value == "J")
            document.getElementById("theValue").innerHTML = "87.5-107.9";
        else
            document.getElementById("theValue").innerHTML = "";     // clear it out if it had value before
    }

</script>
動靜能量
actually i type like this "KD-R411E" and i want "E" character in that word can effect that cell and show like u're answer...how must i do?
klox