i have created a button using the code
<html>
<body>
<form>
<input type="button" value="Hello world!">
</form>
</body>
</html>
i want to add url to this button ie wen i click this button the download should start ( url window should open ) pls help
i have created a button using the code
<html>
<body>
<form>
<input type="button" value="Hello world!">
</form>
</body>
</html>
i want to add url to this button ie wen i click this button the download should start ( url window should open ) pls help
You should either use:
<form action="somefile.php">
<input type="button" value="Hello world!">
</form>
Or use javascript:
<input type="button" value="Hello World!" onclick="doSomething();">
Hope it helps.
Code:<form action="yourfile.zip" target="_blank"> <input type="submit" value="Hello world!"> </form>
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
I really wish there was something like
<input type="button" href="somewhere.html" value="Go somewhere!!">
LOL.
If it was only allowed to create custom attributes then I would have built one for myself with javascript. If only ....
Not a good idea. Javascript should be avoided wherever a non-Javascript alternative can't be offered, and in this case the Javascript wouldn't actually do anything the alternative couldn't, so there'd be no point in having itIf it was only allowed to create custom attributes then I would have built one for myself with javascript. If only ....![]()
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
thank you twey and shachi for your help.
Bookmarks