jquery 转义html字符

extjs里面有htmlencode,那么jquery里面怎么办,看了下面的代码就明白了:

function escape_html(str){
		str = $('#text_holder').text(str).html();
		
		return str;		
	}

够easy吧。


Total views.

© 2013 - 2024. All rights reserved.

Powered by Hydejack v6.6.1