实现的功能不怎么实用,但是只是想试试,结果就发现了这么一个问题,因为是新手,经验不足,不知是什么原因,愿得高手指导,得其所以然我的代码如下:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script language="javascript" type="text/javascript">function b(){     var p = document.getElementById("p")
 p.select();
 p.focus();
}
function d(){
   var rp = document.getElementById("rp") 
   rp.select();
 rp.focus();
}</script>
</head><body>
密码:<input type="password" id="p" name="p"><br>
确认密码:<input type="password" id="rp" name="rp"><br>
<input type="button" onclick="b(), d()" value="确认" ></body>
</html>但是在IE中总是不能同时选中两个文本框中的内容。