简体   繁体   English

javascript / svg提交表单或输入按钮

[英]javascript/svg submit form or input button

Can someone please guide me on how to go about creating a submit form or input button that can be used to create the option of adding for example shapes to the screen. 有人可以指导我如何创建提交表单或输入按钮,这些按钮可用于创建将形状添加到屏幕的选项。

for example something like do you want 2, 3 or 4 shapes on the screen then you choose and press submit or just click with an input button the amount you want 例如,您想要在屏幕上显示2、3或4种形状,然后选择并按Submit(提交),或仅用输入按钮单击所需数量

SVG is present in the DOM. SVG存在于DOM中。 You can simply attach your function to create shapes to any element using javascript. 您可以简单地将函数附加到使用javascript创建形状到任何元素的形状。 Here is a simple example I put together: http://jsfiddle.net/aq6nG/6/ 这是我放在一起的一个简单示例: http : //jsfiddle.net/aq6nG/6/

You don't need a submit button or even a form.. Just include the Raphael library and create any number of Shapes. 您不需要提交按钮甚至不需要表单。只需包括Raphael库并创建任意数量的Shapes。 There's lots of examples at.. http://www.irunmywebsite.com/ On iPod so basic answer at this stage but will check back later.. http://www.irunmywebsite.com/上有很多示例。在iPod上,现阶段的基本答案是,但以后会再检查。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM