使用JS的写法:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> #form1{ width: 80px; height: 150px; display:inline; } #form2{ width: 80px; height: 150px; display:inline; } #select1 { width: 80px; height: 150px; } #select2{ width: 80px; height: 150px; } </style> </head> <body> <form action="" id="form1"> <select name="" id="select1" size="7" multiple="multiple"> <option value="苹果">苹果</option> <option value="香蕉">香蕉</option>