我index.html
看起来像这样
<form name="myForm" action="" method="post" onsubmit="">
<p>
<input type="radio" name="options" id="option1"> Option1 <br>
<input type="radio" name="options" id="option2"> Option2 <br>
<input type="radio" name="options" id="option3"> Option3 <br>
</p>
<p><input type=submit value=Next></p>
</form>
Run Code Online (Sandbox Code Playgroud)
我需要选择按钮.但由于他们都有相同的名字,我不能写作request.form['option']
.如果我的名字不同,用户可以进行多项选择.
难道没有办法通过它的id来获取按钮的状态吗?如果不是,处理这种形式最简单的方法是什么?
我有一个非常简单的main.c
文件:
#include <stdio.h>
int cnt;
extern void increment();
int main()
{
cnt = 0;
increment();
printf("%d\n", cnt);
return 0;
}
Run Code Online (Sandbox Code Playgroud)
甚至更简单hello.asm
:
EXTERN cnt
section .text
global increment
increment:
inc dword [cnt]
ret
Run Code Online (Sandbox Code Playgroud)
首先我main.o
输入gcc -c main.c
然后我得到hello.o
-nasm -f macho hello.asm -DDARWIN
最后,我得到一个可执行文件ld -o main main.o hello.o -arch i386 -lc
并得到一个错误:
ld: warning: -macosx_version_min not specified, assuming 10.10
ld: warning:
ignoring file main.o, file was built for unsupported file format ( …
Run Code Online (Sandbox Code Playgroud) 我有这样的功能
f d = foldl (\acc x -> acc ++ [distance] where distance = 1) d [1..3]
Run Code Online (Sandbox Code Playgroud)
对于一些GHCI说:
error: parse error on input ‘where’
Run Code Online (Sandbox Code Playgroud)