我搞错了 之前没考虑清楚
是这个.setFormatPattern(); IE11时 在这下面这样时就会全部选中
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="./gc.inputman-js.ja.js"></script>
<link rel="stylesheet" href="./gc.inputman-js.css">
</head>
<body>
<input id="mask1" />
<input id="mask2" />
<input id="mask3" />
<input id="mask4" />
<input id="mask5" />
<script>
var mask1 = new GC.InputMan.GcMask(document.getElementById('mask1'));
mask1.setFormatPattern('[#()+-./a-zA-Z0-9]{0,5}');
var mask2 = new GC.InputMan.GcMask(document.getElementById('mask2'));
mask2.setFormatPattern('[#()+-./a-zA-Z0-9]{0,5}');
var mask3 = new GC.InputMan.GcMask(document.getElementById('mask3'));
mask3.setFormatPattern('[#()+-./a-zA-Z0-9]{0,5}');
var mask4 = new GC.InputMan.GcMask(document.getElementById('mask4'));
mask4.setFormatPattern('[#()+-./a-zA-Z0-9]{0,5}');
var mask5 = new GC.InputMan.GcMask(document.getElementById('mask5'));
mask5.setFormatPattern('[#()+-./a-zA-Z0-9]{0,5}');
mask1.setFocus();
</script>
</body>
</html>
|