如何删除这个“其他...”按钮?
我的 HTML 代码如下: 该代码应该更新
通过从下拉列表中选择颜色来文本。我想限制用户只能使用我列出的颜色。
<body>
<p>An example demonstrating the use of the <code><input type="color"></code>
control.</p>
<label for="colorWell">Color:</label>
<input type="color" value="#ff0000" id="colorWell" list="presetColors">
<datalist id="presetColors">
<option>#ff0000</option>
<option>#00ff00</option>
<option>#0000ff</option>
</datalist>
<p>Watch the paragraph colors change when you adjust the color picker.
As you make changes in the color picker, the first paragraph's
color changes, as a preview (this uses the <code>input</code>
event). When you close the color picker, the <code>change</code>
event fires, and we detect that to change every paragraph …Run Code Online (Sandbox Code Playgroud) 我正在运行以下代码:
(define (myignore x)
0
)
(define (myinterpreter mylist)
(evaluate mylist)
)
(define (evaluate mylist)
(if (eqv? (car mylist) 'prog)
(evaluate (cdr mylist))
(display (integer? (car mylist)))
(if (integer? (car mylist))
(display "YESSS")
)
)
(if (eqv? (car mylist) 'myignore)
(myignore (cdr mylist))
)
)
(myinterpreter '(prog 5))
Run Code Online (Sandbox Code Playgroud)
我想知道为什么包含 (display ("YESSS")) 的行不运行,尽管 (display (integer? (car mylist))) 在该行运行之前等于 true?
我正在尝试运行以下代码:
(define (myadd x y)
(+ x y)
)
(myadd '(3 4))
Run Code Online (Sandbox Code Playgroud)
但是,我收到以下错误:
Error: +: number required, but got (3 4) [myadd, +]
Run Code Online (Sandbox Code Playgroud)
如何让 myadd 函数返回 7?
我正在运行以下代码:
(define (myadd x y)
(+ x y)
(display (+ x y))
)
(define (mymul x y)
(* x y)
(display (* x y))
)
(apply myadd '(3 (apply mymul '(3 4)))
Run Code Online (Sandbox Code Playgroud)
我试图在运行时得到答案 12,(apply myadd '(3 (apply mymul '(3 4)))但出现以下错误:
错误:+: number required, but got (apply mymul (quote (3 4))) [apply, (anon), +]