当前位置: 代码迷 >> ASP.NET >> 怎么在js方法中获取字符串中的索引
  详细解决方案

怎么在js方法中获取字符串中的索引

热度:2059   发布时间:2013-02-25 00:00:00.0
如何在js方法中获取字符串中的索引
如何在js方法中获取字符串中的索引
 例如
 function b(span1, span2, span3, message1) {  
  document.getElementById("text1").value;  
  }
如何获取document.getElementById("text1").value; 中字符串索引

------解决方案--------------------------------------------------------
document.getElementById("text1").value.indexOf("xx")
document.getElementById("text1").value.lastIndexOf("xx")
  相关解决方案