用html写一个人力资源编辑页面,要求有姓名、性别、出生日期,并且都是可以编辑的
时间: 2024-05-20 16:17:26 浏览: 16
<!DOCTYPE html>
<html>
<head>
<title>人力资源编辑页面</title>
</head>
<body>
<h1>人力资源编辑页面</h1>
<form>
<label for="name">姓名:</label>
<input type="text" id="name" name="name" required><br><br>
<label for="gender">性别:</label>
<input type="radio" id="male" name="gender" value="male" required>
<label for="male">男</label>
<input type="radio" id="female" name="gender" value="female">
<label for="female">女</label><br><br>
<label for="dob">出生日期:</label>
<input type="date" id="dob" name="dob" required><br><br>
<input type="submit" value="提交">
</form>
</body>
</html>
相关问题
用C++写一个学校人力资源管理系统,并且可以输入信息
好的,学校人力资源管理系统是一个比较复杂的系统,需要考虑很多方面的因素,比如员工的基本信息、考勤记录、工资发放、培训计划等等。以下是一个简单的C++代码框架,您可以根据需要进行修改和完善。
```c++
#include <iostream>
#include <string>
#include <vector>
using namespace std;
// 定义员工类
class Employee {
public:
Employee(string name, string gender, int age, string department, string position, int salary) :
name(name), gender(gender), age(age), department(department), position(position), salary(salary) {}
string getName() { return name; }
string getGender() { return gender; }
int getAge() { return age; }
string getDepartment() { return department; }
string getPosition() { return position; }
int getSalary() { return salary; }
private:
string name; // 姓名
string gender; // 性别
int age; // 年龄
string department; // 部门
string position; // 职位
int salary; // 工资
};
// 定义员工管理类
class EmployeeManager {
public:
void addEmployee(Employee employee) { employees.push_back(employee); } // 添加员工
void removeEmployee(int index) { employees.erase(employees.begin() + index); } // 删除员工
void printAllEmployees() { // 打印所有员工的信息
for (int i = 0; i < employees.size(); i++) {
cout << "姓名:" << employees[i].getName() << endl;
cout << "性别:" << employees[i].getGender() << endl;
cout << "年龄:" << employees[i].getAge() << endl;
cout << "部门:" << employees[i].getDepartment() << endl;
cout << "职位:" << employees[i].getPosition() << endl;
cout << "工资:" << employees[i].getSalary() << endl;
cout << endl;
}
}
private:
vector<Employee> employees; // 员工列表
};
int main() {
EmployeeManager manager; // 员工管理器
// TODO: 添加员工,删除员工,打印员工信息等操作
return 0;
}
```
您可以在main函数中进行添加员工、删除员工、打印员工信息等操作。比如,添加一个员工的方式如下:
```c++
Employee employee("张三", "男", 25, "人事部", "人事专员", 5000);
manager.addEmployee(employee);
```
当然,这只是一个简单的框架,您可以根据实际需求进行修改和完善。
用C++写一个学校人力资源管理系统,并且可以自己输入信息
好的,我可以为您提供一个简单的C++学校人力资源管理系统的代码,具体如下:
```
#include <iostream>
#include <string>
using namespace std;
struct Employee {
string name;
int age;
string position;
double salary;
};
void addEmployee(Employee employees[], int& numEmployees) {
Employee newEmployee;
cout << "Enter name: ";
getline(cin, newEmployee.name);
cout << "Enter age: ";
cin >> newEmployee.age;
cin.ignore(); // ignore newline character
cout << "Enter position: ";
getline(cin, newEmployee.position);
cout << "Enter salary: ";
cin >> newEmployee.salary;
cin.ignore(); // ignore newline character
employees[numEmployees++] = newEmployee;
cout << "Employee added!" << endl;
}
void printEmployees(Employee employees[], int numEmployees) {
for (int i = 0; i < numEmployees; i++) {
cout << "Name: " << employees[i].name << endl;
cout << "Age: " << employees[i].age << endl;
cout << "Position: " << employees[i].position << endl;
cout << "Salary: " << employees[i].salary << endl;
cout << endl;
}
}
int main() {
const int MAX_EMPLOYEES = 100;
Employee employees[MAX_EMPLOYEES];
int numEmployees = 0;
char choice;
do {
cout << "Menu:" << endl;
cout << "1. Add employee" << endl;
cout << "2. Print employees" << endl;
cout << "3. Exit" << endl;
cout << "Enter choice: ";
cin >> choice;
cin.ignore(); // ignore newline character
switch (choice) {
case '1':
addEmployee(employees, numEmployees);
break;
case '2':
printEmployees(employees, numEmployees);
break;
case '3':
cout << "Goodbye!" << endl;
break;
default:
cout << "Invalid choice!" << endl;
break;
}
} while (choice != '3');
return 0;
}
```
这个程序可以让您添加员工的姓名、年龄、职位和薪水信息,并且可以打印所有员工的信息。您可以根据自己的需要进行修改和扩展。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)