我试图弄清楚为什么这不起作用,我不想要一个提交按钮来点击,它确实有效,如果我有一个,而是我使用onchange="this.form.submit()"并发布通常会发布的表单,而不是AJAX背景样式,我没有代码ajax部分,我发现它并使它适用于我的情况,但据我所知$('#ajaxform').submit(function (),提交是提交?为什么不onchange="this.form.submit()"和<input type="submit" />提交的类型相同?我错过了什么?
<form method="post" action="~/getAJAX.cshtml" id="ajaxform" name="form">
@* -------- Div to hold form elements -------- *@
<div class="reportDateDiv">
@* -------- Text --------- *@
<a class="blackColor fSize18 RPtxt">Reporting Period</a>
@* -------- Start day box -------- *@
<input type="text" name="inputDate" spellcheck="false" class="datepickerS metricDateTextbox capitalFirst"
onchange="this.form.submit()" value="@inputDate" autocomplete="off" placeholder="@placeholderStartDate.ToString("MMM d, yyyy")" readonly="readonly" />
@* -------- Text --------- *@
<a class="blackColor fSize16 RPtxt RPtxtTo">to</a>
@* -------- End day box --------- *@
<input type="text" name="endDate" …Run Code Online (Sandbox Code Playgroud) 我在这里使用以下查询来获取我的数据并显示每周的值,但是,当有新的一年并且结果将显示周50, 51, 52 of 2016和周时1, 2, 3 of 2017,它将显示order by周数,1,2,3,50,51,52这意味着2017年结果出现在2016年之前,我该如何改变?
SELECT
DATEPART(wk, date) AS number,
SUM((kg * rep * sett)) AS weight,
SUM(kg / max * rep * sett) AS avg,
SUM((rep * sett)) AS reps,
MAX(kg / max) AS peak
FROM
Test
WHERE
date BETWEEN @0 AND @1 AND exercise < 4
GROUP BY DATEPART(wk, date)
Run Code Online (Sandbox Code Playgroud) 我有几个文本框用of设置width: 100%在 a内,它们在右侧的 div 之外,我不明白,为什么?<div>width350px
看到这个小提琴
另外,这里的代码(与小提琴相同):
<body>
<div class="centerthis">
<form method="post" action="~/AJAXcalls/InsWrkOAJAX.cshtml">
<div class="insertWorkoutFormHolder">
<label class="radioLabel" for="typ4">Primary</label>
<input type="radio" name="Type" id="typ4" value="4" class="radioSelect"><br />
<label class="radioLabel" for="typ5">Secondary</label>
<input type="radio" name="Type" id="typ5" value="5" class="radioSelect" /><br />
<label class="radioLabel" for="typ6">Assistance</label>
<input type="radio" name="Type" id="typ6" value="6" class="radioSelect" /><br />
<br>
<div class="hideThis">
<label class="radioLabel" for="hej1">Squat</label>
<input class="radioSelect" type="radio" name="Exercise" id="hej1" value="1" />
</div>
<br />
<div class="hideThis">
<label class="radioLabel" for="hej2">Benchpress</label>
<input class="radioSelect" type="radio" name="Exercise" id="hej2" value="2" …Run Code Online (Sandbox Code Playgroud)