Questions about the PHP text box

Source: Internet
Author: User
Problems with PHP text boxes
Just learned PHP, encountered a lot of problems, please kindly people help solve!

1. The text box already has the content value= "content", how to do click button, make the content of this text box empty or replace existing content with other content

2. How to select a value in a drop-down menu the corresponding content will be displayed in the other text box
For example, when you choose 1, the text box displays 2
Select 2 when the text box displays 2

Please master advice, there is code to send a.

------Solution--------------------
It should all be JavaScript's problem.
------Solution--------------------


------------------------------
document.getElementById (' Test '). Value = ' text box empty ';//Empty is clear
------Solution--------------------
function Delsearch (svalue) {//reloads the window if Nav4 resized
var Searchkey=document.getelementbyid ("Searchkey");
if (Searchkey.value==svalue) {
Searchkey.value= ";
}
}
------Solution--------------------
JS realize it
------Solution--------------------
。。。 There is a button in the HTML that is designed to be emptied.
HTML code
 
------ Solution--------------------
Explore
... There is a button in the HTML that is designed to be emptied.

HTML Code





2nd forget what the code says,

As long as you send the drop-down box to the value of PHP to the text box, then the text box will appear on the line.

------Solution--------------------
.....
------Solution--------------------
discusses
function Delsearch (svalue) {//reloads The window if Nav4 resized
var Searchkey=document.getelementbyid ("Searchkey");
if (searchkey.value==svalue) {
searchkey.value= ";
}
}

------Solution--------------------
onclick= "reset ()"
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.