<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>indexof 和slice的简单用法</title>
<script src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
<script>
var str="¥25.755(6.5折)";
var end=str.indexOf("(");
alert(end);
alert(str.slice(1,end));
</script>
</head>
<body>
</body>
</html>