$(document).ready(function(){
$(".userinfo_main_csrq i").click(function(){
if ($( this ).siblings("input").attr("type") == "text") {
$( this ).siblings("input")[0].type = "password";
$( this ).removeClass("userinfo_main_csrq_i");
}else{
$( this ).siblings("input")[0].type = "text";
$( this ).addClass("userinfo_main_csrq_i");
}
});
});
<div class="userinfo_main_csrq"><span>原密码</span><b>|</b><input name="old_password" type="password" maxlength="25"><i></i></div>