Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 只读css属性不工作_Html_Css_Readonly - Fatal编程技术网

Html 只读css属性不工作

Html 只读css属性不工作,html,css,readonly,Html,Css,Readonly,捐赠: 税率%: 捐赠净成本 节税 $ x 10% 15% 25% 28% 33% 35% 39.6% = $ $ 您是否尝试在内联css上设置光标事件属性?说 #inputMoney{ cursor-events: none; } 或者您也可以尝试使用disabled='disabled'属性,尽管在提交表单之前必须启用禁用的元素您的goCalc()javascript函数在哪里?在我构建此函数的网站中有很多这样的功能,但我需要让


捐赠:
税率%:
捐赠净成本
节税
$
x
10%
15%
25%
28%
33%
35%
39.6%
=
$   
$

您是否尝试在内联css上设置
光标事件
属性?说

        #inputMoney{
            cursor-events: none;
        }

或者您也可以尝试使用
disabled='disabled'
属性,尽管在提交表单之前必须启用禁用的元素

您的
goCalc()
javascript函数在哪里?在我构建此函数的网站中有很多这样的功能,但我需要让此计算器在没有js的情况下工作(独立经营)由于我需要添加到我正在为其构建的移动应用程序中…您对我如何使其工作有任何建议,因此当用户输入数量时,输出是正确的总数??感谢更新..我发现您关于javascript缺失的说法是正确的…这有很多代码,最后不得不添加部分..awww。。.现在我感觉很糟糕…对不起:-)以下是部分答案。。希望这对所有用户都有帮助;对于这一个,半复杂编码。。。享受**说明(将此代码放在我作为问题发布的代码之后…第1部分>>函数goCalc(formname){if(document.forms[formname].inputIncome.value!=“”)/&&!(isNaN(document.forms[formname].inputIncome.value)){var income=document.forms[formname].inputIncome.value;var percentage=document.forms[formname].inputPercentage.value;var cost;var savings;第2部分>>//去掉逗号和美元符号**由TJ于2015年7月14日修改-固定正常工作收入=收入。替换(/\$/g');收入=收入。替换(/,/g');//计算值节省=数学。舍入(parseInt(收入)*parseInt(百分比))*0.01;成本=数学舍入(parseInt)(收入)*(100 parseInt(百分比))*0.01;//给这两个值一个正确的货币格式,并将其放入表单域document.forms[formname].inputMoney.value=outputMoney(储蓄);document.forms[formname].inputCost.value=outputMoney(成本);//document.forms[formname].InputCome.valuePART 3>=outputMoney(document.forms[formname].InputCome.value);}}函数outputMoney(number){返回outputMoney(Math.floor(number-0)+'')+输出美分(number-0);}函数outputMoney(number){如果(number.length第4部分>>输出+=','+number.substring(mod+3*i,mod+3*i+3);}返回(output);}函数outputMontes(amount){amount=Math.round(((amount)-Math.floor(amount))*100);return(amount<10?'.0'+amount:'.+amount);}**如果您正在复制和粘贴…请记住,在我发布的每个答案/评论之后,都有一个破折号,然后是我的名字,不要包含破折号;否则代码将无法正常工作:-)