没有Test这个把是text直接在后面加就是的<input type="text" name="txt" /><label id="lab1">呵呵</label>

解决方案 »

  1.   


    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function $(sId) {return document.getElementById(sId)}
    是这样的效果吗?function change(oInput){
    if(!$("input")){
    var div = document.createElement("div");
    var input = document.createElement("input");
    input.type = "text";
    input.id = "input";
    document.body.appendChild(div);
    div.appendChild(input);
    input.value = oInput.value;
    oInput.readOnly = true;
    oInput.style.textDecoration = "line-through";
    oInput.style.color = "#ff0000";
    }
    }//-->
    </SCRIPT>
    <INPUT TYPE="text" id="otxt" value="aaaa" onclick="change(this)">
      

  2.   

    改一下,上面发错了<SCRIPT LANGUAGE="JavaScript">
    <!--
    function $(sId) {return document.getElementById(sId)}
    function change(oInput){
    if(!$("input")){
    var div = document.createElement("div");
    var input = document.createElement("input");
    input.type = "text";
    input.id = "input";
    document.body.appendChild(div);
    div.appendChild(input);
    input.value = oInput.value;
    oInput.readOnly = true;
    oInput.style.textDecoration = "line-through";
    oInput.style.color = "#ff0000";
    }
    }//-->
    </SCRIPT>
    <INPUT TYPE="text" id="otxt" value="aaaa" onclick="change(this)">