for example, 4.1-8.2 is 4 months and 2 days
for example, 4.1-8.2 is 4 months and 2 days
isn't it four months and one day?
function date_minus(date1_m, date1_d, date2_m, date2_d) {
var mon_days = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]//
day_minus = date2_d - date1_d,
mon_minus = 0;
for (var i = date2_m; i < date1_m; PPi) {
mon_minus += mon_days[i];
}
return mon_minus + day_minus;
}
Previous: How many ways to bring in resources when displaying pictures in img on vue pages?
Next: How to change the style of the mouse when dragging the drag event in html
original code: $bars[i].style.top =160 - height + sinTable[(ang + (i * freq)) & 4095] * height + px ; $bars[i].style.height = height2 + px ; but it seems that .style is rare, so I m going to use .css instead: var style={ top:160 - heig...
the effect you need to achieve is to click on a link and add class= "on " to .bofangqi dd div. The code written by is as follows: $(".bofangqi dd").on("click",function(){ $(this).find("div").addClass( on ).si...
the details are as follows Zhang San s score is 98, Li Si s score is 65, Wang Wu s score is 75 how to sort by score and show his score and name. Could you tell me how to sort from high to low with JS? Thank you very much. ...
as shown in the picture, jquery.form.js has been imported, and then jquery in order, but still reported an error. Ask God for advice ...
in learning sharp jquery, I encountered a problem when I introduced the old version of jquery (version 1.71 in the book) and the latest version of jquery when the structure and content of html were the same. has a total of four check boxes, which work...
the logic for the background to return the json result is Map<String, Object> resultMap = new HashMap<>(); resultMap.put("userType", userType); resultMap.put("phone", phone); resultMap.put("channel&q...
this is what I m using now var rectangle = new google.maps.Rectangle( { strokeColor : -sharpFF0000 , strokeOpacity : 0.8, strokeWeight : 0, fillColor : -sharp575757 , ...
when looking up the map method in jq, the W3C document has this code $("p").append( $("input").map(function(){ return $(this).val(); }).get().join(", ") ); after searching get (), there is no relevant explanation. What ...
panzoom is very good, with a full range of properties and events, but it s a bit stuck to use. Is there a js or JQ plug-in that is easier to use than panzoom? needs to pan and zoom more smoothly. ...
$(".questionClass>input[type= text ]").val(imgList.join(",")) now that there are four questionClass classes, I need to pinpoint the input, under a certain questionClass in this selector. ...
Why is the js of the same segment normal on PC but not on mobile? html call code: <div id="pgbtn" class="pgbtn_page"> <a class="page_a" href="javascript:;" rel="forum.php?order={$_GET[ orde...
want to find an example of a list click on a list of Tibetan dishes that can click on the right button to appear to the left and then go back to the right when you take it back I don t know what keywords to use to check what is the name of this tec...
I encapsulated a js function myself! There are some problems with using . I set callback, to increase as the number of clicks increases, so does the number of execution. I don t know why! functions encapsulated by js showConfirm(title , content , sh...
textarea how to let users wrap the code before carriage enter with a P element each time they press enter or how to achieve segment spacing (not line spacing) ask for advice ...
hotspotinformation hotspotsmessage the current requirement is that 16 pieces of data are randomly obtained from hotspotmessage, and then it is shown that the calculation attribute hotspots has implemented this requirement. now I want to click on t...
this situation is a bit complicated. the front end shows: first of all, I have a list that will have the member s name plus checkbox (follow) on a date I will display the name of the member with the last day PS:. My form does not have a subscriptio...
error prompt: Uncaught TypeError: autopbn.getAttribute is not a function at exauto_ajax_page.js?s1m:10 var autopbn = $( autopbn ); var nextpageurl = autopbn.getAttribute( rel ).valueOf(); Uncaught TypeError: autopbn.getAttribute is not a function...
want to check how many png files there are. I want him to run in sequence, so it will be very much like the gif action. how can this be done? ...
div divcss when dragging to the middle left, there is also a dotted frame on the left, and when you let go, the dragged div is docked on the left. if you drag to the middle right, the dragged div will dock to the right when you let go. [if my ...
<div id= div1 > <div id= div2 > < div> < div> $( -sharpdiv1 ).on( click ,function(){ div2 })...