This article examples for everyone to inherit extend usage, for your reference, the specific contents are as follows
JS Code
Directly based on the jquery extension, determine if null
$.isblank = function (obj) {return
(typeof (obj) = ' Undefined ' | | obj== ' ' | | obj==null);
}
Directly based on jquery extensions, remove HTML tags, retain content
$.htmlcontent = function (tag) {
var retag =/< (?:. | \s) *?>/g;
Return Tag.replace (Retag, "");
}
Direct based on jquery extension (Mode II)
$.xy = {
sayhello:function () {return ' Hello ';},
saybaybay:function () {return " Baybay ";}
};
jquery class-level extension
$.extend ({
add:function (a,b) {return a+b;},
diff:function (a,b) {return a-b}
});
jquery Object-level extension
$.fn.extend ({
getvalue:function () {return
this.val ();
}
});
HTML code
<%@ page language= "java" import= "java.util.*" pageencoding= "Utf-8"%> <% String Path = Request.getcontextpath ()
;
String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/"; %> <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
Output
The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.