정보의 공유 사회

Front-End

[HTML] 태그 속성 중 readonly 와 disabled의 차이점

< input type=”text” id=”fileName” value=”test.txt” readonly /> < input type=”text” id=”fileName” value=”test.txt” disabled /> Form를  submit를 하였을 때  readonly 의 경우  백엔드 쪽으로 값이 넘어오지만,  disabled의 경우 백엔드 쪽으로 값이 넘어 오지 않는다.   [asp.net mvc 4 Razor 이용시]@Html.TextBoxFor(m => m.ManagerAddress, new { @class = "k-input", @readonly = "readonly" })@Html.TextBoxFor(m => m.OriginNumbers, new { @class = "k-input", type = "hidden", @readonly = "readonly" })@Html.RadioButtonFor(m => m.IsPublicAmount, false, new { @class = "radio", disabled = "disabled" })@Html.RadioButtonFor(m => m.IsPublic, "true", new { id = "IsPublic", disabled = "disabled" })@Html.CheckBoxFor(x => Model.Company[i].ServiceFee, new { @class = "ServiceFee_" + Model.Company[i].Year, disabled = "disabled" })< label>사용< /label>                     //한글...
Front-End

[javascript]Math()함수를 이용한 올림, 버림, 반올림

Math()함수 사용방법 [Math.floor() : 소수점 버림 ] document.write(Math.floor(123.456)); →124 document.write(Math.floor(123.567)); →124 [Math.round() : 소수점 반올림 ] document.write(Math.round(123.456)); →123 document.write(Math.round(123.567)); →124 [Math.ceil() : 소수점 올림 ] document.write(Math.ceil(123.456)); →124  document.write(Math.ceil(123.567)); →124  [toFixed() : 소수점 이하 숫자를 지정한 자릿수만 남기고  반올림] document.write((123.456).toFixed(0)); →123 document.write((123.456).toFixed(2)); →123.46 document.write((123.456).toFixed(4)); →123.4560
error: Content is protected !!