5u文章中图片自动获取alt标题

作者 席鑫淼 来源 ligangxi.com 浏览 发布时间 16/01/06

修改文件位置:inc\class_content.asp

    if instr(content,"img alt=")> 0 then
	    Content = Replace(Content,"<img alt="""" src=""","<img alt=""" & 
Replace(Replace(Ra("title"),"'",""),"""","") & """ src=""")
	end if
    Content = Replace(Content,"<img alt=""","<img onload=""size(this)"" alt=""")
   上面代码是判断文章中img是否带有alt属性,只要修改这几句代码就可以了


FCKConfig.EnterMode = 'br' ; // p | div | br
FCKConfig.ShiftEnterMode = 'p' ; // p | div | br
  这是修改默认编辑器自动添加p属性

Copyright hd30.cn . Some Rights Reserved 冀ICP备19002383号-1