最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

用js实现的页面关键字密度查询代码_javascript技巧

来源:动视网 责编:小采 时间:2020-11-27 20:38:27
文档

用js实现的页面关键字密度查询代码_javascript技巧

用js实现的页面关键字密度查询代码_javascript技巧:关键字密度查询工具我在网上找了很久,还是没找到一个合适的关键字密度查询工具,为什么呢?因为我的站是utf-8编码的,而网上提供的大部分是GB2312的。还是继续找关键字密度查询工具,结果找到一个,不过不是通过输入网址的,而是自己要把代码拷过去的。这样
推荐度:
导读用js实现的页面关键字密度查询代码_javascript技巧:关键字密度查询工具我在网上找了很久,还是没找到一个合适的关键字密度查询工具,为什么呢?因为我的站是utf-8编码的,而网上提供的大部分是GB2312的。还是继续找关键字密度查询工具,结果找到一个,不过不是通过输入网址的,而是自己要把代码拷过去的。这样


关键字密度查询工具我在网上找了很久,还是没找到一个合适的关键字密度查询工具,为什么呢?因为我的站是utf-8编码的,而网上提供的大部分是GB2312的。还是继续找关键字密度查询工具,结果找到一个,不过不是通过输入网址的,而是自己要把代码拷过去的。这样的关键字密度查询工具虽然用起来不是很方面,但我一时也没找到比较好的关键字密度查询工具。如果你找到了,一定要联系我。要求:只要你找的关键字密度查询工具支持UTF-8编码就可以了。 Sub ClearB_OnClick MyWords.txt_Info.value="" MyWords.txt_OnlyText.value="" MyWords.txt_Info.focus() end sub Sub ChkB_OnClick strKW=MyWords.MyKeyword.value str=replace(MyWords.txt_Info.value," ","") str=replace(str," ","") str=replace(str,">","") str=replace(str,"<","") str=replace(str,chr(9),"") str=replace(str,chr(10),"") str=replace(str,chr(13),"") str=replace(str,chr(34),"") str=str&"<" & "script"&"><"& "/script" & ">" htmDes="0 then LenDes=len(htmDes) whereHtmDesL=whereHtmDesL+LenDes whereHtmDesR=InStr(whereHtmDesL, Str, ">",1) MyHtmDes=mid(Str,whereHtmDesL,whereHtmDesR-whereHtmDesL) str=MyHtmDes&str end if htmDes="0 then LenDes=len(htmDes) whereHtmDesL=whereHtmDesL+LenDes whereHtmDesR=InStr(whereHtmDesL, Str, ">",1) MyHtmDes=mid(Str,whereHtmDesL,whereHtmDesR-whereHtmDesL) str=MyHtmDes&str end if LenStr=len(str) 'msgbox "LenStr="&LenStr If InStr(1, Str, "<" & "script",1) > 0 And InStr(1, Str, "<" & "/script" & ">",1) > 0 Then OnlyText = "" i = 1 Do Until i > LenStr tmpStrL = InStr(i , Str, "<" & "script", 1) 'MsgBox "tmpStrL="&tmpStrL If tmpStrL > 0 Then tmpStrR = InStr(tmpStrL, Str, "<" & "/script" & ">",1) 'MsgBox "tmpStrR="&tmpStrR If tmpStrR = 0 Then tmpStrR = LenStr 'MsgBox "i="&i OnlyText = OnlyText & Mid(Str, i, tmpStrL-i) 'MsgBox Mid(Str, i, tmpStrL-i) i = tmpStrR + 9 Else i = i + 1 End If Loop Str = OnlyText End If Str =Str&"<%" OnlyText = "" i = 1 Do Until i > LenStr tmpStrL = InStr(i, Str, "<%", 1) 'MsgBox "tmpStrL=" & tmpStrL If tmpStrL > 0 Then tmpStrR = InStr(tmpStrL, Str, "%>", 1) 'MsgBox "tmpStrR=" & tmpStrR If tmpStrR = 0 Then tmpStrR = LenStr 'MsgBox "i=" & i OnlyText = OnlyText & Mid(Str, i, tmpStrL - i) 'MsgBox Mid(Str, i, tmpStrL - i) i = tmpStrR + 2 Else i = i + 1 End If Loop Str = OnlyText Str =Str&"<" OnlyText = "" i = 1 Do Until i > LenStr tmpStrL = InStr(i, Str, "<", 1) 'MsgBox "tmpStrL=" & tmpStrL If tmpStrL > 0 Then tmpStrR = InStr(tmpStrL, Str, ">", 1) 'MsgBox "tmpStrR=" & tmpStrR If tmpStrR = 0 Then tmpStrR = LenStr 'MsgBox "i=" & i OnlyText = OnlyText & Mid(Str, i, tmpStrL - i) 'MsgBox Mid(Str, i, tmpStrL - i) i = tmpStrR + 1 Else i = i + 1 End If Loop Str = OnlyText LenStr=len(str) LenKW=len(replace(strKW," ","")) if LenStr0 then KeywordTimes=0 i=1 do until i> LenStr tmpStr=instr(i,str,strKW,1) if tmpStr>0 then KeywordTimes=KeywordTimes+1 i=tmpStr+1 else i=i+1 end if loop strlenKW=int(KeywordTimes*LenKW*1000/LenStr+0.5)/10 fmlenKW=cstr(strlenKW) if left(fmlenKW,1)="." then fmlenKW= "0" & fmlenKW msgbox "有"& LenStr& "个字符,关键字出现"&KeywordTimes&"次,关键字密度为" & strlenKW & "%。" ,64,"11-1.cn 字符计算" else msgbox "有"& LenStr& "个字符" ,64,"LoveSEO.com字符计算" end if MyWords.txt_Info.focus() end sub

文档

用js实现的页面关键字密度查询代码_javascript技巧

用js实现的页面关键字密度查询代码_javascript技巧:关键字密度查询工具我在网上找了很久,还是没找到一个合适的关键字密度查询工具,为什么呢?因为我的站是utf-8编码的,而网上提供的大部分是GB2312的。还是继续找关键字密度查询工具,结果找到一个,不过不是通过输入网址的,而是自己要把代码拷过去的。这样
推荐度:
标签: 页面 js 代码
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top