我有这行代码..
raw_input("Hello, %s, this is a question: ") % name
Run Code Online (Sandbox Code Playgroud)
但我得到并且错误地说:
"在字符串格式化过程中并非所有参数都
使用%s时可以使用input()吗?
我想创建一个可以传递参数的按钮,但是你可以看到我给它参数"Jason"的位置,它结束了'onclick'值的行.我该怎么办?
<script type="text/javascript">
function greeting(name,age){
alert("Hello, "+name+", you are "+age+" years old.");
}
</script>
<form>
<input type="button" value="Click me" onclick="greeting("Jason",20)" />
Run Code Online (Sandbox Code Playgroud)