Home >Backend Development >PHP Tutorial >How to implement two-level linkage select whose value remains unchanged after refreshing_PHP tutorial
Background
It is still the relationship between college and major. I need to keep the value before submission in the page selection after clicking the submit button
There are several ways online, or it is included when jumping through the url The parameter form is returned to the page, or the value of the select is saved in the cookie when submitting, and the value in the cookie is filled back into the select after submission.
I followed the method saved in the cookie to realize that the select value does not change after refreshing, and set an onchange event for the select