PHP select,radio and checkbox default selection Implementation _php Tutorial

Source: Internet
Author: User
This is the implementation of the Select default selection for the extended yibing
Copy CodeThe code is as follows:
Value= "1" > Residences Value= "2" > Office Value= "3" > Business Room Value= "4" > Plant Value= "5" > Warehouse Value= "6" > Plots Value= "7" > Complex building Value= "8" > Farm Value= "9" > Business House Value= "Ten" > Hotel Restaurant Value= "One" > School

Radio The default selection implementation of the Radio box
Copy CodeThe code is as follows:
> Blank
> Sell
> Transfer
> Collective

default selection implementation of the CheckBox check box
Copy CodeThe code is as follows:
>Furniture

Name= "Fujia_chuju" type= "checkbox" value= "Chuju" >
Kitchenware

Name= "Fujia_woju" type= "checkbox" value= "Woju" >
Bedding

Name= "Fujia_tv" type= "checkbox" value= "TV" >
Tv

These form fields work together to modify some database records and keep the original records as they were added!

Select Selects by default, select gets selected

Well, I have to admit, my JS is how the dish, just can understand a few lines of code are sometimes difficult, such as today to solve the front-end Select default selection of the problem it took me nearly half an hour, finally found this code to solve the select to get the selection is very simple, The selection of the HTML select with this JS to solve or is very effective, select is selected this solution I think it is worth to keep and share with friends. The code is as follows:

Copy CodeThe code is as follows:



Hope to help you

http://www.bkjia.com/PHPjc/321946.html www.bkjia.com true http://www.bkjia.com/PHPjc/321946.html techarticle This is the implementation method of the Select default selection for the extended yibing copy code code as follows: Select Name= "wuyeleixing" size= "1" option? PHP if ($myrow [wuyeleixing]==1) Echo ("selected");? Value ...

  • 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.