开发者

how to remove(empty) text from a text box?

开发者 https://www.devze.com 2023-01-11 11:14 出处:网络
how to remove text from a text box like- elseif($num_rows >= 1) { ?> <script> document.getElementById(\"newid\").value=\"\";

how to remove text from a text box like-

elseif($num_rows >= 1)
{
?>
    <script>
        document.getElementById("newid").value="";
    </script>
<?php
echo "<font color='Red'><b>$logid</b> Ligin name has already been taken, Please chose another Login name.</font>";
}

this code I am using through ajax but this is 开发者_JS百科not working. newid id text box control id on php login page


I guess you like to set innerHTML to empty instead of value:

document.getElementById("newid").innerHTML="";
0

精彩评论

暂无评论...
验证码 换一张
取 消