我想在用户点击按钮时选择textarea字段.我的代码:
<textarea readonly="readonly"> </textarea> <input type="button" value="Code"/>
Run Code Online (Sandbox Code Playgroud)
Jquery代码:
$(function() {
$(input:button').click(function(){
('textarea').select();
});
});
Run Code Online (Sandbox Code Playgroud)
它不起作用.
我的代码是
void main()
{
float a = 0.7;
if (a < 0.7)
printf("c");
else
printf("c++");
}
Run Code Online (Sandbox Code Playgroud)
它打印C,这很好,a被视为双常数值,其值将0.699999小于0.7.
现在,如果我将值更改为" 0.1,0.2,0.3直到0.9" a并且if condition此时它还会打印C++,除此之外0.7 and 0.9,两者都相等或者更大.
为什么这个概念不考虑所有价值?